Methods
note
All Module methods are available in this class.
lerpFactor
Frame-rate–independent interpolation factor for the last duration.
Non-finite ease falls back to 1.
See demo
const ease = raf.lerpFactor(0.1);
lerp(from, to, ease);
damp
Shorthand for lerp(from, to, raf.lerpFactor(ease)) on the instance.
See demo
value = raf.damp(value, target, 0.1);
pause
Pauses the animation loop.
raf.pause();
play
Starts the animation loop.
raf.play();
destroy
Destroys the instance and cleans up resources.
raf.destroy();