AlphaState as1 = renderer.createAlphaState(); as1.setBlendEnabled(true); as1.setSrcFunction(AlphaState.SB_SRC_ALPHA); as1.setDstFunction(AlphaState.DB_ONE); as1.setTestEnabled(true); as1.setTestFunction(AlphaState.TF_GREATER); as1.setEnabled(true);
particleNode = new Node("particles"); root.attachChild(particleNode);
        public void simpleSetup() {            cam.setFrustum(1f, 1000F, -0.55f, 0.55f, 0.4125f, -0.4125f);            Vector3f loc = new Vector3f(0, 0, -850);            Vector3f left = new Vector3f(1, 0, 0);            Vector3f up = new Vector3f(0, 1, 0f);            Vector3f dir = new Vector3f(0, 0, 1);            cam.setFrame(loc, left, up, dir);                        root = rootNode;            AlphaState as1 = renderer.createAlphaState();            as1.setBlendEnabled(true);            as1.setSrcFunction(AlphaState.SB_SRC_ALPHA);            as1.setDstFunction(AlphaState.DB_ONE);            as1.setTestEnabled(true);            as1.setTestFunction(AlphaState.TF_GREATER);            as1.setEnabled(true);            ZBufferState zbuf = renderer.createZBufferState();            zbuf.setWritable( false );            zbuf.setEnabled( true );            zbuf.setFunction( ZBufferState.CF_LEQUAL );            TextureState ts = renderer.createTextureState();            ts.setTexture(TextureManager.loadTexture(RenParticleEditor.class                    .getClassLoader().getResource(                            "jmetest/data/texture/flaresmall.jpg"),                    Texture.FM_LINEAR, Texture.FM_LINEAR));            ts.setEnabled(true);            particleMesh = ParticleFactory.buildParticles("particles", 300);            particleMesh.setGravityForce(new Vector3f(0.0f, -0.0040f, 0.0f));            particleMesh.setEmissionDirection(new Vector3f(0.0f, 1.0f, 0.0f));            particleMesh.setMaximumAngle(0.2268928f);            particleMesh.getParticleController().setSpeed(1.0f);            particleMesh.setMinimumLifeTime(2000.0f);            particleMesh.setStartSize(10.0f);            particleMesh.setEndSize(10.0f);            particleMesh.setStartColor(new ColorRGBA(0.0f, 0.0625f, 1.0f, 1.0f));            particleMesh.setEndColor(new ColorRGBA(0.0f, 0.0625f, 1.0f, 0.0f));            particleMesh.setRandomMod(1.0f);            particleMesh.warmUp(120);            rootNode.setRenderState(ts);            rootNode.setRenderState(as1);            particleMesh.setRenderState(zbuf);            rootNode.attachChild(particleMesh);            startTime = System.currentTimeMillis() + 5000;        };