• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Type类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.jme3.effect.ParticleMesh.Type的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Type类属于com.jme3.effect.ParticleMesh包,在下文中一共展示了Type类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: fireEffect

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
public ParticleEmitter fireEffect() {
    ParticleEmitter fire = new ParticleEmitter("Emitter", Type.Triangle, 30);
    Material mat_red = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    mat_red.setTexture("Texture", assetManager.loadTexture("Textures/explosion0.png"));
    fire.setMaterial(mat_red);
    fire.setImagesX(8);
    fire.setImagesY(8); // 2x2 texture animation
    fire.setEndColor(new ColorRGBA(1f, 0f, 0f, 1f));   // red
    fire.setStartColor(new ColorRGBA(1f, 1f, 0f, 0.5f)); // yellow
    fire.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 2, 0));
    fire.setStartSize(1.5f);
    fire.setEndSize(0.1f);
    fire.setGravity(0, 0, 0);
    fire.setLowLife(0.5f);
    fire.setHighLife(3f);
    fire.getParticleInfluencer().setVelocityVariation(0.3f);
    return fire;
}
 
开发者ID:ZoltanTheHun,项目名称:SkyHussars,代码行数:19,代码来源:DataManager.java


示例2: prepareEffect

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


示例3: prepareEffect

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


示例4: 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


示例5: createSpark

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
private void createSpark(){
        spark = new ParticleEmitter("Spark", Type.Triangle, 30 * COUNT_FACTOR);
        spark.setStartColor(new ColorRGBA(1f, 0.8f, 0.36f, (float) (1.0f / COUNT_FACTOR_F)));
        spark.setEndColor(new ColorRGBA(1f, 0.8f, 0.36f, 0f));
        spark.setStartSize(.5f);
        spark.setEndSize(.5f);

//        spark.setShape(new EmitterSphereShape(Vector3f.ZERO, .05f));
        spark.setFacingVelocity(true);
        spark.setParticlesPerSec(0);
        spark.setGravity(0, 5, 0);
        spark.setLowLife(1.1f);
        spark.setHighLife(1.5f);
        spark.setInitialVelocity(new Vector3f(0, 20, 0));
        spark.setVelocityVariation(1);
        spark.setImagesX(1);
        spark.setImagesY(1);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
        mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/spark.png"));
        spark.setMaterial(mat);
        explosionEffect.attachChild(spark);
    }
 
开发者ID:mleoking,项目名称:PhET,代码行数:23,代码来源:TestExplosionEffect.java


示例6: createSmokeTrail

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
private void createSmokeTrail(){
        smoketrail = new ParticleEmitter("SmokeTrail", Type.Triangle, 22 * COUNT_FACTOR);
        smoketrail.setStartColor(new ColorRGBA(1f, 0.8f, 0.36f, (float) (1.0f / COUNT_FACTOR_F)));
        smoketrail.setEndColor(new ColorRGBA(1f, 0.8f, 0.36f, 0f));
        smoketrail.setStartSize(.2f);
        smoketrail.setEndSize(1f);

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


示例7: createDebris

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


示例8: createShockwave

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
private void createShockwave(){
        shockwave = new ParticleEmitter("Shockwave", Type.Triangle, 1 * COUNT_FACTOR);
//        shockwave.setRandomAngle(true);
        shockwave.setFaceNormal(Vector3f.UNIT_Y);
        shockwave.setStartColor(new ColorRGBA(.48f, 0.17f, 0.01f, (float) (.8f / COUNT_FACTOR_F)));
        shockwave.setEndColor(new ColorRGBA(.48f, 0.17f, 0.01f, 0f));

        shockwave.setStartSize(0f);
        shockwave.setEndSize(7f);

        shockwave.setParticlesPerSec(0);
        shockwave.setGravity(0, 0, 0);
        shockwave.setLowLife(0.5f);
        shockwave.setHighLife(0.5f);
        shockwave.setInitialVelocity(new Vector3f(0, 0, 0));
        shockwave.setVelocityVariation(0f);
        shockwave.setImagesX(1);
        shockwave.setImagesY(1);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
        mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/shockwave.png"));
        shockwave.setMaterial(mat);
        explosionEffect.attachChild(shockwave);
    }
 
开发者ID:mleoking,项目名称:PhET,代码行数:24,代码来源:TestExplosionEffect.java


示例9: simpleInitApp

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
@Override
    public void simpleInitApp() {
        ParticleEmitter emit = new ParticleEmitter("Emitter", Type.Triangle, 200);
        emit.setShape(new EmitterSphereShape(Vector3f.ZERO, 1f));
        emit.setGravity(0, 0, 0);
        emit.setLowLife(5);
        emit.setHighLife(10);
        emit.setInitialVelocity(new Vector3f(0, 0, 0));
        emit.setImagesX(15);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
        mat.setTexture("Texture", assetManager.loadTexture("Effects/Smoke/Smoke.png"));
        emit.setMaterial(mat);

        rootNode.attachChild(emit);

//        Camera cam2 = cam.clone();
//        cam.setViewPortTop(0.5f);
//        cam2.setViewPortBottom(0.5f);
//        ViewPort vp = renderManager.createMainView("SecondView", cam2);
//        viewPort.setClearEnabled(false);
//        vp.attachScene(rootNode);

    }
 
开发者ID:mleoking,项目名称:PhET,代码行数:24,代码来源:TestParticleEmitter.java


示例10: renderFromControl

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
/**
 * Callback from Control.render(), do not use.
 * 
 * @param rm
 * @param vp 
 */
private void renderFromControl(RenderManager rm, ViewPort vp) {
    Camera cam = vp.getCamera();

    if (meshType == ParticleMesh.Type.Point) {
        float C = cam.getProjectionMatrix().m00;
        C *= cam.getWidth() * 0.5f;

        // send attenuation params
        this.getMaterial().setFloat("Quadratic", C);
    }

    Matrix3f inverseRotation = Matrix3f.IDENTITY;
    TempVars vars = null;
    if (!worldSpace) {
        vars = TempVars.get();

        inverseRotation = this.getWorldRotation().toRotationMatrix(vars.tempMat3).invertLocal();
    }
    particleMesh.updateParticleData(particles, cam, inverseRotation);
    if (!worldSpace) {
        vars.release();
    }
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:30,代码来源:ParticleEmitter.java


示例11: Shockwave

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
public Shockwave(Node rootNode, AssetManager assetManager) {
    shockWave = new ParticleEmitter("Shockwave", Type.Triangle, 1 * COUNT_FACTOR);

    //shockWave.setFaceNormal(Vector3f.UNIT_Z);
    shockWave.setFaceNormal(null);
    shockWave.setStartColor(new ColorRGBA(.48f, 0.17f, 0.01f, (float) (.8f / COUNT_FACTOR_F)));
    shockWave.setEndColor(new ColorRGBA(.48f, 0.17f, 0.01f, 0f));
    
    //Modified these two values to fit the circle
    shockWave.setStartSize(4f);
    shockWave.setEndSize(8f);
    
    shockWave.setParticlesPerSec(0);
    shockWave.setGravity(0, 0, 0);
    shockWave.setLowLife(0.5f);
    shockWave.setHighLife(0.5f);
    shockWave.setImagesX(1);
    shockWave.setImagesY(1);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    //Chaned from "m_Texture" to "Texture" on next line
    mat.setTexture("Texture", assetManager.loadTexture("Textures/Effects/shockwave.png"));
    shockWave.setMaterial(mat);
    
    rootNode.attachChild(shockWave);
}
 
开发者ID:utsav2601,项目名称:MinionVsAlien-3D-game,代码行数:26,代码来源:Shockwave.java


示例12: createSpark

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
private void createSpark(){
    spark = new ParticleEmitter("Spark", Type.Triangle, 30 * COUNT_FACTOR);
    spark.setStartColor(new ColorRGBA(1f, 0.8f, 0.36f, (float) (1.0f / COUNT_FACTOR_F)));
    spark.setEndColor(new ColorRGBA(1f, 0.8f, 0.36f, 0f));
    spark.setStartSize(.5f);
    spark.setEndSize(.5f);
    spark.setFacingVelocity(true);
    spark.setParticlesPerSec(0);
    spark.setGravity(0, 5, 0);
    spark.setLowLife(1.1f);
    spark.setHighLife(1.5f);
    spark.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 20, 0));
    spark.getParticleInfluencer().setVelocityVariation(1);
    spark.setImagesX(1);
    spark.setImagesY(1);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/spark.png"));
    spark.setMaterial(mat);
    explosionEffect.attachChild(spark);
}
 
开发者ID:devinbost,项目名称:jMathGame3d,代码行数:21,代码来源:ExplosionEffect.java


示例13: createFire

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
private void createFire() {
    fire = new ParticleEmitter("Emitter", ParticleMesh.Type.Triangle, 200);
    Material fire_mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    fire_mat.setTexture("Texture", assetManager.loadTexture("Effects/flame.png"));
    fire.setMaterial(fire_mat);
    fire.setImagesX(2);
    fire.setImagesY(2);
    fire.setRandomAngle(true);
    attachChild(fire);

    fire.setStartColor(new ColorRGBA(1f, 1f, .5f, 1f));
    fire.setEndColor(new ColorRGBA(1f, 0f, 0f, 0f));
    fire.setGravity(0, 0, 0);
    fire.setStartSize(10f);
    fire.setEndSize(1f);
    fire.setLowLife(2f);
    fire.setHighLife(3f);
    fire.getParticleInfluencer().setVelocityVariation(4f);
    fire.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 3f, 0));
    fire.setParticlesPerSec(0);
}
 
开发者ID:kemonoske,项目名称:ArcaneMining,代码行数:22,代码来源:Explosion.java


示例14: createBurst

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


示例15: createEmbers

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
private void createEmbers() {
    embers = new ParticleEmitter("embers", Type.Triangle, 50);
    Material embers_mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    embers_mat.setTexture("Texture", assetManager.loadTexture("Effects/roundspark.png"));
    embers.setMaterial(embers_mat);
    embers.setImagesX(1);
    embers.setImagesY(1);
    attachChild(embers);

    embers.setStartColor(new ColorRGBA(1f, 0.29f, 0.34f, 1.0f));
    embers.setEndColor(new ColorRGBA(0, 0, 0, 0.5f));
    embers.setStartSize(1.2f);
    embers.setEndSize(1.8f);
    embers.setGravity(0, -.5f, 0);
    embers.setLowLife(1.8f);
    embers.setHighLife(5f);
    embers.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 3, 0));
    embers.getParticleInfluencer().setVelocityVariation(.5f);
    embers.setShape(new EmitterSphereShape(Vector3f.ZERO, 2f));
    embers.setParticlesPerSec(0);

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


示例16: createSparks

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
private void createSparks() {
    sparks = new ParticleEmitter("Spark", Type.Triangle, 20);
    Material spark_mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    spark_mat.setTexture("Texture", assetManager.loadTexture("Effects/spark.png"));
    sparks.setMaterial(spark_mat);
    sparks.setImagesX(1);
    sparks.setImagesY(1);
    attachChild(sparks);

    sparks.setStartColor(new ColorRGBA(1f, 0.8f, 0.36f, 1.0f)); // orange
    sparks.setEndColor(new ColorRGBA(1f, 0.8f, 0.36f, 0f));
    sparks.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 10, 0));
    sparks.getParticleInfluencer().setVelocityVariation(1);
    sparks.setFacingVelocity(true);
    sparks.setGravity(0, 10, 0);
    sparks.setStartSize(.5f);
    sparks.setEndSize(.5f);
    sparks.setLowLife(.9f);
    sparks.setHighLife(1.1f);
    sparks.setParticlesPerSec(0);

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


示例17: createSmoke

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


示例18: createDebris

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


示例19: createShockwave

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
private void createShockwave() {
    shockwave = new ParticleEmitter("Shockwave", Type.Triangle, 2);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    mat.setTexture("Texture", assetManager.loadTexture("Effects/shockwave.png"));
    shockwave.setImagesX(1);
    shockwave.setImagesY(1);
    shockwave.setMaterial(mat);
    explosionEffect.attachChild(shockwave);

    /* The shockwave faces upward (along the Y axis) to make it appear as
     * a horizontally expanding circle. */
    shockwave.setFaceNormal(Vector3f.UNIT_Y);
    shockwave.setStartColor(new ColorRGBA(.68f, 0.77f, 0.61f, 1f));
    shockwave.setEndColor(new ColorRGBA(.68f, 0.77f, 0.61f, 0f));
    shockwave.setStartSize(1f);
    shockwave.setEndSize(7f);
    shockwave.setGravity(0, 0, 0);
    shockwave.setLowLife(1f);
    shockwave.setHighLife(1f);
    shockwave.getParticleInfluencer().setInitialVelocity(new Vector3f(0, 0, 0));
    shockwave.getParticleInfluencer().setVelocityVariation(0f);
    shockwave.setParticlesPerSec(0);
}
 
开发者ID:kemonoske,项目名称:ArcaneMining,代码行数:24,代码来源:Explosion.java


示例20: setMeshType

import com.jme3.effect.ParticleMesh.Type; //导入依赖的package包/类
/**
 * Sets the type of mesh used by the particle emitter.
 * @param meshType The mesh type to use
 */
@Override
public void setMeshType(ParticleMesh.Type meshType) {
    this.meshType = meshType;
    switch (meshType) {
        case Point:
            particleMesh = new ParticlePointMesh();
            this.setMesh(particleMesh);
            break;
        case Triangle:
            particleMesh = new ParticleTriMesh();
            this.setMesh(particleMesh);
            break;
        default:
            throw new IllegalStateException("Unrecognized particle type: " + meshType);
    }
    this.setNumParticles2(particles.length);
}
 
开发者ID:methusalah,项目名称:OpenRTS,代码行数:22,代码来源:MyParticleEmitter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PrintJob类代码示例发布时间:2022-05-22
下一篇:
Java MiniHadoopClusterManager类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap