1 package com.jme3.asset; 2 3 import com.jme3.material.Material; 4 5 /** 6 * Used for loading {@link Material materials} only (not material definitions). 7 * 8 * @author Kirill Vainer 9 */ 10 public class MaterialKey extends AssetKey { 11 public MaterialKey(String name){ 12 super(name); 13 } 14 15 public MaterialKey(){ 16 super(); 17 } 18 19 @Override 20 public boolean useSmartCache(){ 21 return true; 22 } 23 24 @Override 25 public Object createClonedInstance(Object asset){ 26 Material mat = (Material) asset; 27 return mat.clone(); 28 } 29 } 30