当前位置: 首页>>代码示例>>Java>>正文


Java Type.Point方法代码示例

本文整理汇总了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);
    
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:26,代码来源:TestPointSprite.java

示例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);
}
 
开发者ID:GSam,项目名称:Game-Project,代码行数:23,代码来源:SimpleGun.java

示例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));
    
}
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:37,代码来源:TestPointSprite.java


注:本文中的com.jme3.effect.ParticleMesh.Type.Point方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。