v133 · javascript
Animation.overallProgress
Adds an "overallProgress" property to the JavaScript class Animation[1].
concepts
-
overallProgress
Animation.overallProgress — a 0..1 progress value that accounts for delays, iterations, and direction in one number.
-
Scroll vs Time
Two animations — one time-driven, one scroll-driven — reporting
overallProgressside by side. The motivating use case for the API: one progress number that works across timeline kinds. -
Iteration meter
Configure delay, iteration count, and direction; scrub time and watch
overallProgresslinearise multi-iteration animations into one 0..1 ribbon, with per-loop bars below. -
Orchestration dashboard
Three concurrent animations — different durations, iteration counts, and directions — aggregated into a single parent “average progress” bar via
overallProgress. -
Progress sequence
Five sequential loading phases — Connecting, Authenticating, Fetching, Processing, Rendering — each driven by a CSS animation with chained
animation-delay.overallProgressreads each phase's 0–1 value to feed a master progress bar and per-phase indicators. No timer math, noDate.now()arithmetic. -
ViewTimeline overallProgress
Adds a third panel to the timeline comparison: a
ViewTimelinetracking when a sentinel element enters/leaves a scroller viewport. All three timelines —DocumentTimeline,ScrollTimeline,ViewTimeline— report the same 0..1 shape throughoverallProgress, confirming the API's timeline-independence.
why it shipped
This property is provide authors a convenient and consistent representation of how far along an animation has advanced across its iterations and regardless of the nature of its timeline. Without animation.overallProgress, a developer would need to manually compute how far an animation has advanced factoring in the number of iterations of the animation and whether the currentTime of the animation is a percentage of total time (as in the case of scroll-driven animations) or an absolute time quantity (as in the case of time-driven animations).