aboutsummaryrefslogtreecommitdiff
path: root/engine/src/core/com/jme3/asset/MaterialKey.java
blob: cc74fbc7ebd083c5c94cc52ea58c41371f1786cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.jme3.asset;

import com.jme3.material.Material;

/**
 * Used for loading {@link Material materials} only (not material definitions).
 * 
 * @author Kirill Vainer
 */
public class MaterialKey extends AssetKey {
    public MaterialKey(String name){
        super(name);
    }

    public MaterialKey(){
        super();
    }

    @Override
    public boolean useSmartCache(){
        return true;
    }
    
    @Override
    public Object createClonedInstance(Object asset){
        Material mat = (Material) asset;
        return mat.clone();
    }
}