🤩 Web Animations Excitement!
🎉 🎉 `Animation.overallProgress` is coming! 🎉 🎉
With it, you can easily and consistently get an animation’s progress, regardless of the timeline being used.
Here’s a demo that syncs a Scroll-Driven Animation’s progress to a 3D model’s rotation:
https://codepen.io/bramus/full/xbKxRzy
(Needs a browser with Scroll-Driven Animations support. Uses `Animation.progress` when available or falls back to some extra code to get the progress)
Before this addition, you needed to extract the progress from the animation’s effect. Like so:
```js
let progress = animation.effect.getComputedTiming().progress * 1;
if (animation.playState === "finished") progress = 1;
progress = Math.max(0.0, Math.min(1.0, progress)).toFixed(2);
```
Ugh.