[csswg-drafts] [web-animations-2] Need to preserve animation progress when setting timeline on animation. (#6452)

JTensai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [web-animations-2] Need to preserve animation progress when setting timeline on animation. ==
When transitioning between timeline types (time based, progress based) we need to make sure that progress of the animation is preserved.

This can be done by caching the progress by taking the old current time and dividing by the old effect end.

`progress = old_current_time / effect_end`

Then we take that percentage and multiply it by the new effect end in the following cases:

1. timeline is valid && non-monotonically increasing timeline && old play state == paused && old current time is valid
2. timeline is valid && monotonically increasing timeline && old current time is valid && old timeline is non-monotonically increasing timeline.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6452 using your GitHub account


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

Received on Wednesday, 14 July 2021 20:23:12 UTC