Closed ling1726 closed 3 months ago
Ths user will no longer need to provide a stopping condition. The fallback animation now returns its own imperative stop function
stop
const animation = fallbackPaintAnimation({...options, isStopped: () => false}); const { id, play, canvas, cleanup } = animation(node); let stopCondition = false; const isStopped = () => stopCondition === true; play(onComplete, isStopped, onUpdate); const stop = () => stopCondition = true; // stops the animation stop();
const animation = fallbackPaintAnimation({...options}); const { id, play, stop, canvas, cleanup } = animation(node); play(onComplete, onUpdate); // stops the animation stop();
Ths user will no longer need to provide a stopping condition. The fallback animation now returns its own imperative
stop
functionBefore
After