playcanvas/engine — pull request #108 by guycalledfrank (2014-12-05 21:38:50+00:00)
Title: Particles interface and stuff

New particle interface and underlying logic:
- reset() resets particle state, doesn't affect playing;
- stop() disables the emission of new particles, lets others to finish simulation;
- play() continues the emission, also unpauses;
- pause() freezes the emitter;
- isPlaying() tells if emission is in progress;
- "oneShot" parameter replaced with "loop" (same, but inversed);
- non-looped (oneShot) emitters do not start emission unless play() is called;

simple and sparks examples are updated.

Fixed CPU stretching.
Fixed WebGL warning spamming by disallowing particles being rendered into depth map. Added meshInstance.drawToDepth boolean to control it.