Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/AndreiRudenko/sparkler
Modular Macro-powered Particle System for haxe
https://github.com/AndreiRudenko/sparkler
haxe kha modular particle-system particles
Last synced: about 1 month ago
JSON representation
Modular Macro-powered Particle System for haxe
- Host: GitHub
- URL: https://github.com/AndreiRudenko/sparkler
- Owner: AndreiRudenko
- License: zlib
- Created: 2017-12-01T07:09:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-01T16:41:16.000Z (about 3 years ago)
- Last Synced: 2024-05-23T07:58:25.562Z (7 months ago)
- Topics: haxe, kha, modular, particle-system, particles
- Language: Haxe
- Homepage:
- Size: 302 KB
- Stars: 16
- Watchers: 5
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-game-engine-dev - Sparkler - Modular macro-powered particle system. (Libraries / Haxe)
README
## Sparkler
A modular 2d particle system.### Features
* Macro-powered.
* Customizable.
* You can create custom `ParticleModule` to extend functionality.
* Local/World Space rendering.
* Multiple frameworks support: [Kha](https://github.com/Kode/Kha) and [Clay](https://github.com/clay2d/clay) for now.### Sample Usage
```haxe
var emitter = new ParticleEmitter<
ColorListOverLifetimeModule,
InitialVelocityModule,
KhaSpriteRendererModule
>({
cacheSize: 512,
lifetime: 2,
emitterLifetime: 5,
emitRate: 50,
colorListOverLifetime: {
ease: null,
list: [
{
time: 0,
value: 0xFFFF0000
},
{
time: 0.5,
value: 0xFFFF00FF
},
{
time: 1,
value: 0x00FF00FF
}
]
},
initialVelocity: {x: 0, y: -200},
khaSpriteRenderer: {
image: kha.Assets.images.particle
},
sortFunc: function(a, b) {
return a.age < b.age ? 1 : -1;
}
});emitter.start();
```