本文整理汇总了Java中com.jme3.effect.ParticleMesh.Type.Point方法的典型用法代码示例。如果您正苦于以下问题:Java Type.Point方法的具体用法?Java Type.Point怎么用?Java Type.Point使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.effect.ParticleMesh.Type
的用法示例。
在下文中一共展示了Type.Point方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: simpleInitApp
import com.jme3.effect.ParticleMesh.Type; //导入方法依赖的package包/类
@Override
public void simpleInitApp() {
ParticleEmitter emit = new ParticleEmitter("Emitter", Type.Point, 10000);
emit.setShape(new EmitterBoxShape(new Vector3f(-1.8f, -1.8f, -1.8f),
new Vector3f(1.8f, 1.8f, 1.8f)));
emit.setGravity(0, 0, 0);
emit.setLowLife(60);
emit.setHighLife(60);
emit.setInitialVelocity(new Vector3f(0, 0, 0));
emit.setImagesX(15);
emit.setStartSize(0.05f);
emit.setEndSize(0.05f);
emit.setStartColor(ColorRGBA.White);
emit.setEndColor(ColorRGBA.White);
emit.setSelectRandomImage(true);
emit.emitAllParticles();
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
mat.setBoolean("PointSprite", true);
mat.setTexture("Texture", assetManager.loadTexture("Effects/Smoke/Smoke.png"));
emit.setMaterial(mat);
rootNode.attachChild(emit);
}
示例2: initBloodEffect
import com.jme3.effect.ParticleMesh.Type; //导入方法依赖的package包/类
private void initBloodEffect () {
blood = new ParticleEmitter("blood", Type.Point, 32 * 30);
blood.setSelectRandomImage(true);
blood.setStartColor(new ColorRGBA(0.1f, 0.0f, 0.0f, 1f));
blood.setEndColor(new ColorRGBA(0.1f, 0.0f, 0.0f, 1f));
blood.setStartSize(1f);
blood.setEndSize(1f);
blood.setShape(new EmitterSphereShape(Vector3f.ZERO, 1f));
blood.setParticlesPerSec(0);
blood.setGravity(0, 10, 0);
blood.setLowLife(0.2f);
blood.setHighLife(0.2f);
blood.getParticleInfluencer().setInitialVelocity(new Vector3f(0, -9, 0));
blood.getParticleInfluencer().setVelocityVariation(0f);
blood.setImagesX(2);
blood.setImagesY(2);
Material mat = new Material(world.getAssetManager(), "Common/MatDefs/Misc/Particle.j3md");
mat.setTexture("Texture", world.getAssetManager().loadTexture("Effects/Explosion/flame.png"));
mat.setBoolean("PointSprite", true);
blood.setMaterial(mat);
world.getNode().attachChild(blood);
}
示例3: simpleInitApp
import com.jme3.effect.ParticleMesh.Type; //导入方法依赖的package包/类
@Override
public void simpleInitApp() {
final ParticleEmitter emit = new ParticleEmitter("Emitter", Type.Point, 10000);
emit.setShape(new EmitterBoxShape(new Vector3f(-1.8f, -1.8f, -1.8f),
new Vector3f(1.8f, 1.8f, 1.8f)));
emit.setGravity(0, 0, 0);
emit.setLowLife(60);
emit.setHighLife(60);
emit.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 0, 0));
emit.setImagesX(15);
emit.setStartSize(0.05f);
emit.setEndSize(0.05f);
emit.setStartColor(ColorRGBA.White);
emit.setEndColor(ColorRGBA.White);
emit.setSelectRandomImage(true);
emit.emitAllParticles();
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
mat.setBoolean("PointSprite", true);
mat.setTexture("Texture", assetManager.loadTexture("Effects/Smoke/Smoke.png"));
emit.setMaterial(mat);
rootNode.attachChild(emit);
inputManager.addListener(new ActionListener() {
public void onAction(String name, boolean isPressed, float tpf) {
if ("setNum".equals(name) && isPressed) {
emit.setNumParticles(5000);
emit.emitAllParticles();
}
}
}, "setNum");
inputManager.addMapping("setNum", new KeyTrigger(KeyInput.KEY_SPACE));
}