|
|
|
@ -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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|