drawcall / Proton

Javascript particle animation library
https://drawcall.github.io/Proton/
MIT License
2.42k stars 275 forks source link

how to stop the emitter? #44

Closed yuebanbird closed 7 years ago

yuebanbird commented 7 years ago

I try to stop the emitter,I use the cancelAnimationFrame,but by this,the picture just freeze. I'm a fresh in this,I want to stop the next emitter.Pleae help me.

ulisinn commented 7 years ago

I'm working on a trivial example with pix.js v4, this seems to work for me: (!emitterActive) ? emitter.emit() : emitter.stopEmit();

yuebanbird commented 7 years ago

Thanks for your help,this is useful and solve my problem.