Flint Particle System Forum - Updating Steady counter rate2012-05-27T07:11:54+01:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Updating Steady counter ratehttp://flintparticles.org/forum/comments.php?DiscussionID=368&Focus=1242#Comment_12422010-07-05T13:38:52+01:002010-07-09T13:30:12+01:00Xorhttp://flintparticles.org/forum/account.php?u=381
I've ran into an issue trying to programmatically update the rate of a Steady counter.
I've wanted to start with emitting no particles and for convenience, I tried to set the rate of Steady to 0 ...
I've wanted to start with emitting no particles and for convenience, I tried to set the rate of Steady to 0 and the increase it at a later time.
However, this causes Steady's _timeToNext to bet set to Infinity, effectively making any further rate changes ineffective.
A similar issue exists with very small numbers, scheduling the next emit so far in the future that rate changes never apply in time.
A work around is to call startEmitter(), which resets _timeToNext and allows the new rate to take effect.
I suggest to reset _timeToNext in the rate setter as well, so that rate changes apply without having to take the extra step.
P.S: Great work you've done with Flint! I really enjoy working with its nice syntax.]]>
Updating Steady counter ratehttp://flintparticles.org/forum/comments.php?DiscussionID=368&Focus=1246#Comment_12462010-07-09T13:30:02+01:002012-05-27T07:11:54+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
Thanks for the bug report. I've updated the code in SVN. The change will be in the next full release.