diff --git a/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/layer.xml b/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/layer.xml index 03900f765..64c89d833 100644 --- a/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/layer.xml +++ b/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/layer.xml @@ -12,7 +12,7 @@ - + diff --git a/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/BleedCube.xml b/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/ColoredCube.xml similarity index 66% rename from sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/BleedCube.xml rename to sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/ColoredCube.xml index 670e79b1a..585b1586f 100644 --- a/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/BleedCube.xml +++ b/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/ColoredCube.xml @@ -4,14 +4,14 @@ - + - BleedCube - Textured with color bleeding through + ColoredCube + Plainly colored lit material \ No newline at end of file diff --git a/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/JmePaletteBleedCube.java b/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/JmePaletteColoredCube.java similarity index 75% rename from sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/JmePaletteBleedCube.java rename to sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/JmePaletteColoredCube.java index b910f9c85..10789d666 100644 --- a/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/JmePaletteBleedCube.java +++ b/sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/JmePaletteColoredCube.java @@ -40,15 +40,18 @@ import org.openide.text.ActiveEditorDrop; * * @author normenhansen */ -public class JmePaletteBleedCube implements ActiveEditorDrop { +public class JmePaletteColoredCube implements ActiveEditorDrop { - public JmePaletteBleedCube() { + public JmePaletteColoredCube() { } private String createBody() { - String body = " /** A cube with a color \"bleeding\" through transparent texture. Uses Texture from jme3-test-data library! */ \n Box boxshape4 = new Box(Vector3f.ZERO, 1f,1f,1f);\n Geometry cube_leak = new Geometry(\"Bleed-through color cube\", boxshape4);\n Material mat_tl = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n mat_tl.setTexture(\"ColorMap\", assetManager.loadTexture(\"Textures/ColoredTex/Monkey.png\"));\n mat_tl.setColor(\"Color\", new ColorRGBA(1f,0f,1f, 1f)); // purple\n cube_leak.setMaterial(mat_tl);\n rootNode.attachChild(cube_leak); "; + String body = "/* A colored lit cube. Needs light source! */ \n Box boxMesh = new Box(1f,1f,1f); \n Geometry boxGeo = new Geometry(\"Colored Box\", boxMesh); \n Material boxMat = new Material(assetManager, \"Common/MatDefs/Light/Lighting.j3md\"); \n boxMat.setBoolean(\"UseMaterialColors\", true); \n boxMat.setColor(\"Ambient\", ColorRGBA.Green); \n boxMat.setColor(\"Diffuse\", ColorRGBA.Green); \n boxGeo.setMaterial(boxMat); \n rootNode.attachChild(boxGeo);"; return body; + + + } public boolean handleTransfer(JTextComponent targetComponent) {