Function: changeSpeed()
changeSpeed(
animation,speedFunc,options?):ChangeSpeed
Defined in: animation/speed/index.ts:229
Create a ChangeSpeed animation that modifies playback speed dynamically.
Parameters
animation
The animation to wrap
speedFunc
A function mapping progress (0-1) to speed multiplier
options?
Optional configuration
Returns
A new ChangeSpeed animation
Example
// Slow down at the end for emphasis
changeSpeed(fadeIn(circle), (t) => 1 + (1 - t));
// Speed up in the middle
changeSpeed(rotate(square), (t) => {
const mid = Math.abs(t - 0.5);
return 0.5 + mid * 3; // Slow at edges, fast in middle
});