Skip to content

Jeddic/particlemonkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Particle Monkey

This is a particle emitter implementation based on some early code from t0neg0d's particle emitter and extended to allow for particle attribute animation.

Gradle

dependencies {
    implementation 'com.epagagames:particlemonkey:1.1.0'
}

Basic Usage

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
    mat.getAdditionalRenderState().setFaceCullMode(RenderState.FaceCullMode.Off);
    Texture tex = assetManager.loadTexture("Effects/Particles/part_light.png");
    mat.setTexture("Texture", tex);
    
    Emitter emitter = new Emitter("test", mat, 100);
    emitter.setStartSpeed(new ValueType(6.5f));
    emitter.setLifeFixedDuration(2.0f);
    emitter.setEmissionsPerSecond(20);
    emitter.setParticlesPerEmission(1);
    emitter.setShape(new EmitterCone());
    ((EmitterCone)emitter.getShape()).setRadius(0.005f);

    emitter.setLocalTranslation(0, 0.5f, 0);
    rootNode.attachChild(emitter);

For further usage please visit the Wiki

About

A particle Emitter library for jME

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages