Creates a timer that calls callback once every frame until duration
milliseconds have elapsed.
callback is called with the normalized progress (0-1) between
the start and the end.
This timer is designed to be used with the easing module to create tweens and animations.
Length of the interpolation in milliseconds
Function that will be called each frame
Creates a timer that calls callback once every duration milliseconds.
An alternative to setInterval that won't run in the background.
The interval timer can be used to create fixed rate animation loops.
// call update at 30fps
Timers.interval(1000 / 30, update);
Length of the interval in milliseconds
Callback which is called with the delta in milliseconds between the current call and the last one.
Creates a timer that calls callback after duration milliseconds
have elapsed.
An alternative to setTimeout that won't run in the background.
Duration in milliseconds
Function to call when the timeout completes
Generated using TypeDoc
Creates a timer based on
requestAnimationFramethat callscallbackevery frame, with the delta in milliseconds since the last frame.