Fixed reported bugs in drag&drop Palette (typo in xml file, use of deprecated effects API in Java files)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9185 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
roo..li 13 years ago
parent f07446e0d4
commit 321c50c514
  1. 2
      sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/InputListener.xml
  2. 2
      sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/JmePaletteExplosion.java
  3. 2
      sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/JmePaletteFire.java
  4. 2
      sdk/jme3-codepalette/src/com/jme3/gde/codepalette/scene/JmePaletteInputListener.java

@ -4,7 +4,7 @@
<editor_palette_item version="1.0">
<class name="com.jme3.gde.codepalette.scene.JmePaletteTInputListener" />
<class name="com.jme3.gde.codepalette.scene.JmePaletteInputListener" />
<icon16 urlvalue="com/jme3/gde/core/sceneviewer/jme-logo.png" />
<icon32 urlvalue="com/jme3/gde/core/sceneviewer/jme-logo.png" />

@ -47,7 +47,7 @@ public class JmePaletteExplosion implements ActiveEditorDrop {
private String createBody() {
String body = " /** Explosion effect. Uses Texture from jme3-test-data library! */ \n ParticleEmitter debris = new ParticleEmitter(\"Debris\", ParticleMesh.Type.Triangle, 10);\n Material debris_mat = new Material(assetManager, \"Common/MatDefs/Misc/Particle.j3md\");\n debris_mat.setTexture(\"Texture\", assetManager.loadTexture(\"Effects/Explosion/Debris.png\"));\n debris.setMaterial(debris_mat);\n debris.setImagesX(3); debris.setImagesY(3); // 3x3 texture animation\n debris.setRotateSpeed(4);\n debris.setSelectRandomImage(true);\n debris.setStartVel(new Vector3f(0, 4, 0));\n debris.setStartColor(new ColorRGBA(1f, 1f, 1f, 1f));\n debris.setGravity(6f);\n debris.setVariation(.60f);\n rootNode.attachChild(debris);\n debris.emitAllParticles();\n";
String body = " /** Explosion effect. Uses Texture from jme3-test-data library! */ \n ParticleEmitter debris = new ParticleEmitter(\"Debris\", ParticleMesh.Type.Triangle, 10);\n Material debris_mat = new Material(assetManager, \"Common/MatDefs/Misc/Particle.j3md\");\n debris_mat.setTexture(\"Texture\", assetManager.loadTexture(\"Effects/Explosion/Debris.png\"));\n debris.setMaterial(debris_mat);\n debris.setImagesX(3); debris.setImagesY(3); // 3x3 texture animation\n debris.setRotateSpeed(4);\n debris.setSelectRandomImage(true);\n debris.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 4, 0));\n debris.setStartColor(new ColorRGBA(1f, 1f, 1f, 1f));\n debris.setGravity(0f,6f,0f);\n debris.getParticleInfluencer().setVelocityVariation(.60f);\n rootNode.attachChild(debris);\n debris.emitAllParticles();\n";
return body;
}

@ -47,7 +47,7 @@ public class JmePaletteFire implements ActiveEditorDrop {
private String createBody() {
String body = " /** Uses Texture from jme3-test-data library! */\n ParticleEmitter fire = new ParticleEmitter(\"Emitter\", ParticleMesh.Type.Triangle, 30);\n Material mat_red = new Material(assetManager, \"Common/MatDefs/Misc/Particle.j3md\");\n //mat_red.setTexture(\"Texture\", assetManager.loadTexture(\"Effects/Explosion/flame.png\"));\n fire.setMaterial(mat_red);\n fire.setImagesX(2); fire.setImagesY(2); // 2x2 texture animation\n fire.setEndColor( new ColorRGBA(1f, 0f, 0f, 1f)); // red\n fire.setStartColor(new ColorRGBA(1f, 1f, 0f, 0.5f)); // yellow\n fire.setStartVel(new Vector3f(0, 2, 0));\n fire.setStartSize(0.6f);\n fire.setEndSize(0.1f);\n fire.setGravity(0);\n fire.setLowLife(0.5f);\n fire.setHighLife(3f);\n fire.setVariation(0.3f);\n rootNode.attachChild(fire);\n";
String body = " /** Uses Texture from jme3-test-data library! */\n ParticleEmitter fire = new ParticleEmitter(\"Emitter\", ParticleMesh.Type.Triangle, 30);\n Material mat_red = new Material(assetManager, \"Common/MatDefs/Misc/Particle.j3md\");\n //mat_red.setTexture(\"Texture\", assetManager.loadTexture(\"Effects/Explosion/flame.png\"));\n fire.setMaterial(mat_red);\n fire.setImagesX(2); fire.setImagesY(2); // 2x2 texture animation\n fire.setEndColor( new ColorRGBA(1f, 0f, 0f, 1f)); // red\n fire.setStartColor(new ColorRGBA(1f, 1f, 0f, 0.5f)); // yellow\n fire.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 2, 0));\n fire.setStartSize(0.6f);\n fire.setEndSize(0.1f);\n fire.setGravity(0f,0f,0f);\n fire.setLowLife(0.5f);\n fire.setHighLife(3f);\n fire.getParticleInfluencer().setVelocityVariation(0.3f);\n rootNode.attachChild(fire);\n";
return body;
}

@ -47,7 +47,7 @@ public class JmePaletteInputListener implements ActiveEditorDrop {
private String createBody() {
String body = "/**Use ActionListener to respond to pressed/released inputs (keys presses, mouse clicks) */ \n private ActionListener actionListener = new ActionListener(){\n public void onAction(String name, boolean pressed, float tpf){\n System.out.println(name + \" = \" + pressed);\n }\n};\n /** Use AnalogListener to respond to continuous inputs (key presses, mouse clicks) */\n private AnalogListener analogListener = new AnalogListener() {\n public void onAnalog(String name, float value, float tpf) {\n System.out.println(name + \" = \" + value);\n }\n}; \n";
String body = "/**Use ActionListener to respond to pressed/released inputs (key presses, mouse clicks) */ \n private ActionListener actionListener = new ActionListener(){\n public void onAction(String name, boolean pressed, float tpf){\n System.out.println(name + \" = \" + pressed);\n }\n};\n /** Use AnalogListener to respond to continuous inputs (key presses, mouse clicks) */\n private AnalogListener analogListener = new AnalogListener() {\n public void onAnalog(String name, float value, float tpf) {\n System.out.println(name + \" = \" + value);\n }\n};";
return body;
}

Loading…
Cancel
Save