Re: [csswg-drafts] [scroll-animations-1] currentTime for animations attached to a timeline attachment range (#8669)

I'm not sure mapping `animation.progress` to `animation.effect.getComputedTiming().progress` is a good idea.

The returned value is based on the various timing properties of the of rootmost effect so it feels like a layering violation to make it look like a property of the animation.

Admittedly, we do something similar when we report an animation as "finished" since the point in time at which it finishes is based on the timing of its rootmost effect, if any but we've very deliberately chosen to make that compromise for that specific case and we've gone all in on it, adding `finish()`, `finished` and finish events.

I'm not sure if reporting the iteration progress for the rootmost effect deserves that kind of treatment, especially because it is the _iteration_ progress.

If we need something to report the fraction from where an animation starts to where it finishes, maybe we should introduce a new concept for that (e.g. "animation progress") and expose that instead? Such a value would presumably be independent of any delays etc. specified on the rootmost effect.

I guess it depends on what the ultimate use case is for this?

-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8669#issuecomment-1501315318 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 10 April 2023 02:31:17 UTC