https://github.com/samme/phaser-batch-emitter
Fast, no-physics particle emitter
https://github.com/samme/phaser-batch-emitter
phaser
Last synced: about 2 months ago
JSON representation
Fast, no-physics particle emitter
- Host: GitHub
- URL: https://github.com/samme/phaser-batch-emitter
- Owner: samme
- Created: 2016-12-07T01:59:46.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-08T02:12:10.000Z (over 9 years ago)
- Last Synced: 2025-06-20T12:13:48.679Z (12 months ago)
- Topics: phaser
- Language: CoffeeScript
- Homepage: https://samme.github.io/phaser-batch-emitter/
- Size: 209 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Phaser Batch Emitter ✨
====================
Fast, no-physics particle emitter based on [Phaser.SpriteBatch](http://phaser.io/docs/2.6.2/Phaser.SpriteBatch.html).
```javascript
game.add.batchEmitter(x, y, maxParticles)
// configure …
.makeParticles(key, frame, quantity)
.explode()
// or
.flow()
```
It works very similarly to [Phaser.Particles.Arcade.Emitter](http://phaser.io/docs/2.6.2/Phaser.Particles.Arcade.Emitter.html). See the [examples](https://samme.github.io/phaser-batch-emitter/) and [source](https://github.com/samme/phaser-batch-emitter/blob/master/index.coffee) for details. You can set
```javascript
emitter.debug = true;
emitter.log = true;
```
to see better what your emitter is doing.
Differences to Phaser.Particles.Arcade.Emitter
----------------------------------------------
- `rotation` is in radians, not degrees
- `makeParticles` works like [Phaser.Group#createMultiple](http://phaser.io/docs/2.6.2/Phaser.Group.html#createMultiple) for multiple frames
Not yet implemented
-------------------
- [ ] autoAlpha duration
- [ ] autoScale duration
Best performance
----------------
angularDrag: 0
maxRotation: 0
minRotation: 0
particleBringToTop: false
particleDrag: null
particleSendToBack: false