本文整理汇总了Java中com.jme3.effect.ParticleEmitter.setParticleInfluencer方法的典型用法代码示例。如果您正苦于以下问题:Java ParticleEmitter.setParticleInfluencer方法的具体用法?Java ParticleEmitter.setParticleInfluencer怎么用?Java ParticleEmitter.setParticleInfluencer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.jme3.effect.ParticleEmitter
的用法示例。
在下文中一共展示了ParticleEmitter.setParticleInfluencer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTrailEmitter
import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createTrailEmitter() {
ParticleEmitter trail = new ParticleEmitter("trail-emitter",
ParticleMesh.Type.Triangle, 650);
Material mat
= new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
mat.setTexture("Texture", assets.loadTexture("Effects/smoketrail.png"));
trail.setMaterial(mat);
trail.setImagesX(1);
trail.setImagesY(3);
trail.setSelectRandomImage(true);
trail.setStartColor(new ColorRGBA(0.7f, 0.7f, 0.7f, 0.7f));
trail.setParticleInfluencer(new ParticleInfluencerWithAngleSetting());
trail.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
trail.getParticleInfluencer().setVelocityVariation(0f);
trail.setStartSize(1.7f);
trail.setEndSize(1.7f);
trail.setGravity(Vector3f.ZERO);
trail.setLowLife(0.3f);
trail.setHighLife(0.3f);
trail.setParticlesPerSec(2000);
trail.setFaceNormal(Vector3f.UNIT_Y);
trail.setRandomAngle(true);
return trail;
}
示例2: createTrailEmitter
import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createTrailEmitter() {
ParticleEmitter trail = new ParticleEmitter("trail-emitter",
ParticleMesh.Type.Triangle, 650);
Material mat
= new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
mat.setTexture("Texture", assets.loadTexture("Effects/smoketrail.png"));
trail.setMaterial(mat);
trail.setImagesX(1);
trail.setImagesY(3);
trail.setSelectRandomImage(true);
trail.setStartColor(new ColorRGBA(0.3f, 0.3f, 0.9f, 1f));
trail.setParticleInfluencer(new ParticleInfluencerWithAngleSetting());
trail.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
trail.getParticleInfluencer().setVelocityVariation(0f);
trail.setStartSize(2f);
trail.setEndSize(2f);
trail.setGravity(Vector3f.ZERO);
trail.setLowLife(0.3f);
trail.setHighLife(0.3f);
trail.setParticlesPerSec(2000);
trail.setFaceNormal(Vector3f.UNIT_Y);
return trail;
}
示例3: createTrailEmitter
import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createTrailEmitter() {
ParticleEmitter trail = new ParticleEmitter("trail-emitter",
ParticleMesh.Type.Triangle, 650);
Material mat
= new Material(assets, "Common/MatDefs/Misc/Particle.j3md");
mat.setTexture("Texture", assets.loadTexture("Effects/smoketrail.png"));
trail.setMaterial(mat);
trail.setImagesX(1);
trail.setImagesY(3);
trail.setSelectRandomImage(true);
trail.setStartColor(new ColorRGBA(0.3f, 0.3f, 0.9f, 0.6f));
trail.setParticleInfluencer(new ParticleInfluencerWithAngleSetting());
trail.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
trail.getParticleInfluencer().setVelocityVariation(0f);
trail.setStartSize(1f);
trail.setEndSize(1f);
trail.setGravity(Vector3f.ZERO);
trail.setLowLife(0.2f);
trail.setHighLife(0.2f);
trail.setParticlesPerSec(2000);
trail.setFaceNormal(Vector3f.UNIT_Y);
return trail;
}
示例4: createParticleEffect
import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createParticleEffect() {
ParticleEmitter dust = new ParticleEmitter("smoke-puff",
ParticleMesh.Type.Triangle, 80);
Material material = new Material(Globals.assets,
"Common/MatDefs/Misc/Particle.j3md");
material.setTexture("Texture",
Globals.assets.loadTexture("Effects/flame_alpha.png"));
material.getAdditionalRenderState()
.setBlendMode(RenderState.BlendMode.Alpha);
dust.setMaterial(material);
dust.setImagesX(2);
dust.setImagesY(2);
dust.setSelectRandomImage(true);
dust.setStartColor(new ColorRGBA(0.3f, 0.15f, 0.03f, 0.3f));
dust.setEndColor(new ColorRGBA(0.3f, 0.15f, 0.03f, 0.01f));
RadialParticleInfluencer influencer = new RadialParticleInfluencer();
influencer.setOrigin(Vector3f.ZERO);
influencer.setHorizontal(false);
influencer.setRadialVelocity(Toss.SPLASH_RADIUS / 0.5f);
dust.setParticleInfluencer(influencer);
dust.setStartSize(15.0f);
dust.setEndSize(30.0f);
dust.setGravity(Vector3f.ZERO);
dust.setLowLife(0.5f);
dust.setHighLife(0.5f);
dust.setParticlesPerSec(0);
dust.setRandomAngle(true);
dust.setShape(new EmitterCircleShape(Vector3f.ZERO, 2.0f));
return dust;
}