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


Java ParticleEmitter.setSelectRandomImage方法代码示例

本文整理汇总了Java中com.jme3.effect.ParticleEmitter.setSelectRandomImage方法的典型用法代码示例。如果您正苦于以下问题:Java ParticleEmitter.setSelectRandomImage方法的具体用法?Java ParticleEmitter.setSelectRandomImage怎么用?Java ParticleEmitter.setSelectRandomImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jme3.effect.ParticleEmitter的用法示例。


在下文中一共展示了ParticleEmitter.setSelectRandomImage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: prepareEffect

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void prepareEffect(AssetManager assetManager) {
    int COUNT_FACTOR = 1;
    float COUNT_FACTOR_F = 1f;
    effect = new ParticleEmitter("Flame", Type.Triangle, 32 * COUNT_FACTOR);
    effect.setSelectRandomImage(true);
    effect.setStartColor(new ColorRGBA(1f, 0.4f, 0.05f, (float) (1f / COUNT_FACTOR_F)));
    effect.setEndColor(new ColorRGBA(.4f, .22f, .12f, 0f));
    effect.setStartSize(1.3f);
    effect.setEndSize(2f);
    effect.setShape(new EmitterSphereShape(Vector3f.ZERO, 1f));
    effect.setParticlesPerSec(0);
    effect.setGravity(0, -5f, 0);
    effect.setLowLife(.4f);
    effect.setHighLife(.5f);
    effect.setInitialVelocity(new Vector3f(0, 7, 0));
    effect.setVelocityVariation(1f);
    effect.setImagesX(2);
    effect.setImagesY(2);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/flame.png"));
    effect.setMaterial(mat);
    effect.setLocalScale(100);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:24,代码来源:BombControl.java

示例2: prepareEffect

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void prepareEffect() {
    int COUNT_FACTOR = 1;
    float COUNT_FACTOR_F = 1f;
    effect = new ParticleEmitter("Flame", Type.Triangle, 32 * COUNT_FACTOR);
    effect.setSelectRandomImage(true);
    effect.setStartColor(new ColorRGBA(1f, 0.4f, 0.05f, (float) (1f / COUNT_FACTOR_F)));
    effect.setEndColor(new ColorRGBA(.4f, .22f, .12f, 0f));
    effect.setStartSize(1.3f);
    effect.setEndSize(2f);
    effect.setShape(new EmitterSphereShape(Vector3f.ZERO, 1f));
    effect.setParticlesPerSec(0);
    effect.setGravity(0, -5, 0);
    effect.setLowLife(.4f);
    effect.setHighLife(.5f);
    effect.setInitialVelocity(new Vector3f(0, 7, 0));
    effect.setVelocityVariation(1f);
    effect.setImagesX(2);
    effect.setImagesY(2);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/flame.png"));
    effect.setMaterial(mat);
    effect.setLocalScale(100);
    rootNode.attachChild(effect);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:25,代码来源:TestWalkingChar.java

示例3: simpleInitApp

import com.jme3.effect.ParticleEmitter; //导入方法依赖的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

示例4: createFlame

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createFlame(){
    flame = new ParticleEmitter("Flame", EMITTER_TYPE, 32 * COUNT_FACTOR);
    flame.setSelectRandomImage(true);
    flame.setStartColor(new ColorRGBA(1f, 0.4f, 0.05f, (float) (1f / COUNT_FACTOR_F)));
    flame.setEndColor(new ColorRGBA(.4f, .22f, .12f, 0f));
    flame.setStartSize(1.3f);
    flame.setEndSize(2f);
    flame.setShape(new EmitterSphereShape(Vector3f.ZERO, 1f));
    flame.setParticlesPerSec(0);
    flame.setGravity(0, -5, 0);
    flame.setLowLife(.4f);
    flame.setHighLife(.5f);
    flame.setInitialVelocity(new Vector3f(0, 7, 0));
    flame.setVelocityVariation(1f);
    flame.setImagesX(2);
    flame.setImagesY(2);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/flame.png"));
    mat.setBoolean("PointSprite", POINT_SPRITE);
    flame.setMaterial(mat);
    explosionEffect.attachChild(flame);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:23,代码来源:TestExplosionEffect.java

示例5: createFlash

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createFlash(){
    flash = new ParticleEmitter("Flash", EMITTER_TYPE, 24 * COUNT_FACTOR);
    flash.setSelectRandomImage(true);
    flash.setStartColor(new ColorRGBA(1f, 0.8f, 0.36f, (float) (1f / COUNT_FACTOR_F)));
    flash.setEndColor(new ColorRGBA(1f, 0.8f, 0.36f, 0f));
    flash.setStartSize(.1f);
    flash.setEndSize(3.0f);
    flash.setShape(new EmitterSphereShape(Vector3f.ZERO, .05f));
    flash.setParticlesPerSec(0);
    flash.setGravity(0, 0, 0);
    flash.setLowLife(.2f);
    flash.setHighLife(.2f);
    flash.setInitialVelocity(new Vector3f(0, 5f, 0));
    flash.setVelocityVariation(1);
    flash.setImagesX(2);
    flash.setImagesY(2);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/flash.png"));
    mat.setBoolean("PointSprite", POINT_SPRITE);
    flash.setMaterial(mat);
    explosionEffect.attachChild(flash);
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:23,代码来源:TestExplosionEffect.java

示例6: createDebris

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createDebris(){
        debris = new ParticleEmitter("Debris", Type.Triangle, 15 * COUNT_FACTOR);
        debris.setSelectRandomImage(true);
        debris.setRandomAngle(true);
        debris.setRotateSpeed(FastMath.TWO_PI * 4);
        debris.setStartColor(new ColorRGBA(1f, 0.59f, 0.28f, (float) (1.0f / COUNT_FACTOR_F)));
        debris.setEndColor(new ColorRGBA(.5f, 0.5f, 0.5f, 0f));
        debris.setStartSize(.2f);
        debris.setEndSize(.2f);

//        debris.setShape(new EmitterSphereShape(Vector3f.ZERO, .05f));
        debris.setParticlesPerSec(0);
        debris.setGravity(0, 12f, 0);
        debris.setLowLife(1.4f);
        debris.setHighLife(1.5f);
        debris.setInitialVelocity(new Vector3f(0, 15, 0));
        debris.setVelocityVariation(.60f);
        debris.setImagesX(3);
        debris.setImagesY(3);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
        mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/Debris.png"));
        debris.setMaterial(mat);
        explosionEffect.attachChild(debris);
    }
 
开发者ID:mleoking,项目名称:PhET,代码行数:25,代码来源:TestExplosionEffect.java

示例7: createFlame

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createFlame(){
    flame = new ParticleEmitter("Flame", EMITTER_TYPE, 32 * COUNT_FACTOR);
    flame.setSelectRandomImage(true);
    flame.setStartColor(new ColorRGBA(1f, 0.4f, 0.05f, (float) (1f / COUNT_FACTOR_F)));
    flame.setEndColor(new ColorRGBA(.4f, .22f, .12f, 0f));
    flame.setStartSize(1.3f);
    flame.setEndSize(2f);
    flame.setShape(new EmitterSphereShape(Vector3f.ZERO, 1f));
    flame.setParticlesPerSec(0);
    flame.setGravity(0, -5, 0);
    flame.setLowLife(.4f);
    flame.setHighLife(.5f);
    flame.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 7, 0));
    flame.getParticleInfluencer().setVelocityVariation(1f);
    flame.setImagesX(2);
    flame.setImagesY(2);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/flame.png"));
    mat.setBoolean("PointSprite", POINT_SPRITE);
    flame.setMaterial(mat);
    explosionEffect.attachChild(flame);
}
 
开发者ID:devinbost,项目名称:jMathGame3d,代码行数:23,代码来源:ExplosionEffect.java

示例8: createBurst

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createBurst() {
    burst = new ParticleEmitter("Flash", Type.Triangle, 5);
    Material burst_mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    burst_mat.setTexture("Texture", assetManager.loadTexture("Effects/flash.png"));
    burst.setMaterial(burst_mat);
    burst.setImagesX(2);
    burst.setImagesY(2);
    burst.setSelectRandomImage(true);
    attachChild(burst);

    burst.setStartColor(new ColorRGBA(1f, 0.8f, 0.36f, 1f));
    burst.setEndColor(new ColorRGBA(1f, 0.8f, 0.36f, 0f));
    burst.setStartSize(.1f);
    burst.setEndSize(6.0f);
    burst.setGravity(0, 0, 0);
    burst.setLowLife(.5f);
    burst.setHighLife(.5f);
    burst.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 5f, 0));
    burst.getParticleInfluencer().setVelocityVariation(1);
    burst.setShape(new EmitterSphereShape(Vector3f.ZERO, .5f));
    burst.setParticlesPerSec(0);

}
 
开发者ID:kemonoske,项目名称:ArcaneMining,代码行数:24,代码来源:Explosion.java

示例9: createSmoke

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createSmoke() {
    smoke = new ParticleEmitter("Smoke emitter", Type.Triangle, 40);
    Material smoke_mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    smoke_mat.setTexture("Texture", assetManager.loadTexture("Effects/smoke.png"));
    smoke.setMaterial(smoke_mat);
    smoke.setImagesX(2);
    smoke.setImagesY(2);
    smoke.setSelectRandomImage(true);
    attachChild(smoke);

    debris.setStartColor(new ColorRGBA(0.5f, 0.5f, 0.5f, .3f));
    debris.setEndColor(new ColorRGBA(.1f, 0.1f, 0.1f, 0f));
    debris.setLowLife(4f);
    debris.setHighLife(5f);
    smoke.setRandomAngle(true);
    smoke.getParticleInfluencer().setInitialVelocity(new Vector3f(0, .5f, 0));
    smoke.getParticleInfluencer().setVelocityVariation(1);

    smoke.setParticlesPerSec(0);
}
 
开发者ID:kemonoske,项目名称:ArcaneMining,代码行数:21,代码来源:Explosion.java

示例10: createDebris

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void createDebris() {
    debris = new ParticleEmitter("Debris", Type.Triangle, 15);
    Material debris_mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    debris_mat.setTexture("Texture", assetManager.loadTexture("Effects/debris.png"));
    debris.setMaterial(debris_mat);
    debris.setImagesX(3);
    debris.setImagesY(3);
    debris.setSelectRandomImage(false);
    attachChild(debris);

    debris.setRandomAngle(true);
    debris.setRotateSpeed(FastMath.TWO_PI * 4);
    debris.setStartColor(new ColorRGBA(0.4f, 0.4f, 0.0f, 1.0f));
    debris.setEndColor(new ColorRGBA(0.4f, 0.4f, 0.0f, 1.0f));
    debris.setStartSize(.2f);
    debris.setEndSize(2f);
    debris.setGravity(0, 15f, 0);
    debris.setLowLife(2f);
    debris.setHighLife(3f);
    debris.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 7, 0));
    debris.getParticleInfluencer().setVelocityVariation(.60f);
    debris.setParticlesPerSec(0);

}
 
开发者ID:kemonoske,项目名称:ArcaneMining,代码行数:25,代码来源:Explosion.java

示例11: 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;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:24,代码来源:Zap.java

示例12: prepareEffect

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private void prepareEffect() {
        int COUNT_FACTOR = 1;
        float COUNT_FACTOR_F = 1f;
        effect = new ParticleEmitter("Flame", Type.Triangle, 32 * COUNT_FACTOR);
        effect.setSelectRandomImage(true);
        effect.setStartColor(new ColorRGBA(1f, 0.4f, 0.05f, (float) (1f / COUNT_FACTOR_F)));
        effect.setEndColor(new ColorRGBA(.4f, .22f, .12f, 0f));
        effect.setStartSize(1.3f);
        effect.setEndSize(2f);
        effect.setShape(new EmitterSphereShape(Vector3f.ZERO, 1f));
        effect.setParticlesPerSec(0);
        effect.setGravity(0, -5, 0);
        effect.setLowLife(.4f);
        effect.setHighLife(.5f);
        effect.setInitialVelocity(new Vector3f(0, 7, 0));
        effect.setVelocityVariation(1f);
        effect.setImagesX(2);
        effect.setImagesY(2);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
        mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/flame.png"));
        effect.setMaterial(mat);
//        effect.setLocalScale(100);
        rootNode.attachChild(effect);
    }
 
开发者ID:chototsu,项目名称:MikuMikuStudio,代码行数:25,代码来源:TestWalkingChar.java

示例13: createEnergyEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createEnergyEmitter() {
    ParticleEmitter energy = new ParticleEmitter("energy-emitter",
            ParticleMesh.Type.Triangle, 200);
    Material material = new Material(assets,
            "Common/MatDefs/Misc/Particle.j3md");
    material.setTexture("Texture",
            assets.loadTexture("Effects/flame_alpha.png"));
    material.getAdditionalRenderState()
            .setBlendMode(RenderState.BlendMode.Alpha);
    energy.setMaterial(material);
    energy.setImagesX(2);
    energy.setImagesY(2);
    energy.setSelectRandomImage(true);
    energy.setStartColor(new ColorRGBA(0f, 0f, 0f, 0.8f));
    energy.setEndColor(new ColorRGBA(0f, 0f, 0f, 0.6f));
    energy.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    energy.setStartSize(4.5f);
    energy.setEndSize(0.5f);
    energy.setGravity(Vector3f.ZERO);
    energy.setLowLife(0.1f);
    energy.setHighLife(0.1f);
    energy.setParticlesPerSec(100);

    energy.setRandomAngle(true);
    return energy;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:27,代码来源:DarkEnergy.java

示例14: createSmokeEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
private ParticleEmitter createSmokeEmitter() {
    ParticleEmitter smoke = new ParticleEmitter("smoke-emitter",
            ParticleMesh.Type.Triangle, 300);
    Material materialGray = new Material(assets,
            "Common/MatDefs/Misc/Particle.j3md");
    materialGray.setTexture("Texture",
            assets.loadTexture("Effects/flame.png"));
    smoke.setMaterial(materialGray);
    smoke.setImagesX(2);
    smoke.setImagesY(2);
    smoke.setSelectRandomImage(true);
    smoke.setStartColor(new ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f));
    smoke.setStartColor(new ColorRGBA(0.5f, 0.5f, 0.5f, 0.1f));
    smoke.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    smoke.setStartSize(2.0f);
    smoke.setEndSize(6.0f);
    smoke.setGravity(Vector3f.ZERO);
    smoke.setLowLife(1f);
    smoke.setHighLife(1.3f);
    smoke.setParticlesPerSec(100);

    smoke.setRandomAngle(true);
    return smoke;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:25,代码来源:Fireball.java

示例15: createFireEmitter

import com.jme3.effect.ParticleEmitter; //导入方法依赖的package包/类
static ParticleEmitter createFireEmitter() {
    ParticleEmitter fire = new ParticleEmitter("fire-emitter",
            ParticleMesh.Type.Triangle, 200);
    Material mat = new Material(assets,
            "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assets.loadTexture("Effects/flame.png"));
    fire.setMaterial(mat);
    fire.setImagesX(2);
    fire.setImagesY(2);
    fire.setSelectRandomImage(true);
    fire.setStartColor(new ColorRGBA(0.95f, 0.150f, 0.0f, 1.0f));
    fire.setEndColor(new ColorRGBA(1.0f, 1.0f, 0.0f, 0.5f));
    fire.getParticleInfluencer().setInitialVelocity(Vector3f.ZERO);
    fire.setStartSize(2.5f);
    fire.setEndSize(1.0f);
    fire.setGravity(Vector3f.ZERO);
    fire.setLowLife(0.1f);
    fire.setHighLife(0.1f);
    fire.setParticlesPerSec(200);

    fire.setRandomAngle(true);
    return fire;
}
 
开发者ID:TripleSnail,项目名称:Arkhados,代码行数:24,代码来源:Fireball.java


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