Fork me on GitHub
Not signed in (Sign In)
    • CommentAuthorXor
    • CommentTimeJul 5th 2010 edited
     
    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 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.
    • CommentAuthorRichard
    • CommentTimeJul 9th 2010
     
    Thanks for the bug report. I've updated the code in SVN. The change will be in the next full release.