replaced deprecated ColoredTextured by Unshaded.j3md in sample
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9192 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
8848c90b47
commit
05dc1f1909
@ -80,7 +80,7 @@ public class HelloMaterial extends SimpleApplication {
|
|||||||
/** A cube with its base color "leaking" through a partially transparent texture */
|
/** A cube with its base color "leaking" through a partially transparent texture */
|
||||||
Box boxshape4 = new Box(new Vector3f(3f,-1f,0f), 1f,1f,1f);
|
Box boxshape4 = new Box(new Vector3f(3f,-1f,0f), 1f,1f,1f);
|
||||||
Geometry cube_leak = new Geometry("Leak-through color cube", boxshape4);
|
Geometry cube_leak = new Geometry("Leak-through color cube", boxshape4);
|
||||||
Material mat_tl = new Material(assetManager, "Common/MatDefs/Misc/ColoredTextured.j3md");
|
Material mat_tl = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
|
||||||
mat_tl.setTexture("ColorMap", assetManager.loadTexture("Textures/ColoredTex/Monkey.png"));
|
mat_tl.setTexture("ColorMap", assetManager.loadTexture("Textures/ColoredTex/Monkey.png"));
|
||||||
mat_tl.setColor("Color", new ColorRGBA(1f,0f,1f, 1f)); // purple
|
mat_tl.setColor("Color", new ColorRGBA(1f,0f,1f, 1f)); // purple
|
||||||
cube_leak.setMaterial(mat_tl);
|
cube_leak.setMaterial(mat_tl);
|
||||||
@ -103,6 +103,7 @@ public class HelloMaterial extends SimpleApplication {
|
|||||||
shiny_rock.setLocalTranslation(0,2,-2); // Move it a bit
|
shiny_rock.setLocalTranslation(0,2,-2); // Move it a bit
|
||||||
shiny_rock.rotate(1.6f, 0, 0); // Rotate it a bit
|
shiny_rock.rotate(1.6f, 0, 0); // Rotate it a bit
|
||||||
rootNode.attachChild(shiny_rock);
|
rootNode.attachChild(shiny_rock);
|
||||||
|
|
||||||
/** Must add a light to make the lit object visible! */
|
/** Must add a light to make the lit object visible! */
|
||||||
DirectionalLight sun = new DirectionalLight();
|
DirectionalLight sun = new DirectionalLight();
|
||||||
sun.setDirection(new Vector3f(1,0,-2).normalizeLocal());
|
sun.setDirection(new Vector3f(1,0,-2).normalizeLocal());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user