https://github.com/Jeddic/particlemonkey
A particle Emitter library for jME
https://github.com/Jeddic/particlemonkey
Last synced: 9 months ago
JSON representation
A particle Emitter library for jME
- Host: GitHub
- URL: https://github.com/Jeddic/particlemonkey
- Owner: Jeddic
- License: bsd-3-clause
- Created: 2019-10-07T20:58:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-05T01:00:12.000Z (over 1 year ago)
- Last Synced: 2024-03-05T02:23:52.107Z (over 1 year ago)
- Language: Java
- Size: 352 KB
- Stars: 15
- Watchers: 5
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-JMonkeyEngine - ParticleMonkey
README
# 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**
-
``` groovy
dependencies {
implementation 'com.epagagames:particlemonkey:1.1.0'
}
```
**Basic Usage**
-
``` java
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](https://github.com/Jeddic/particlemonkey/wiki)