Closed samcreate closed 2 years ago
The emit
property starts and stops emission of particles. If you aren't sure how to plug in your speed function, emission rate is controlled by the frequency
property (must be greater than 0). You might find it cleanest to subclass Emitter
and override the frequency
getter and setter, which could also make it easier to play around with the parent
getter to put your particles in different containers for parallaxing (it will probably be a lot more complicated than just that).
Release 5.0.0 adds Emitter.emitNow()
, which will let you emit particles on demand, although it may not work as seamlessly as the normal update loop if you are moving the emitter to follow the mouse.
I have the particles emitting at a good rate, and a function that calculates speed, but I can't figure out for the life of me this best approach to generate more bubbles on demand?