martinwells/playcraftengine — pull request #28 by Fours (2014-07-18 01:32:24+00:00)
Title: Added a new option to animations, allowDroppedFrames...

...and implemented this in the update function. Setting the option to true means the animation will prioritize time over frames, skipping frames if needed.

I found the need for this while working on a timer that had an animation. The animation wouldn't finish during the allotted time because the default behavior was to play every frame. By allowing the animation to skip or drop frames, the result was a smoother "tweening" sort of effect, where time is prioritized over frames. So for instance when an animation's is 75% done in terms of time, it will be roughly 75% of the way through the total number of frames.