Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web-animations-2] Support setting animation currentTime and startTime using CSSNumericValue #6458

Open
JTensai opened this issue Jul 16, 2021 · 0 comments
Labels
web-animations-2 Current Work

Comments

@JTensai
Copy link
Contributor

JTensai commented Jul 16, 2021

The process for setting animation currentTime and startTime needs to be updated to handle CSSNumericValue inputs.

For progress based animations, I suggest we only allow CSSNumericValues that are percentages. which makes setting the time as simple as:
(new_current_time / 100) * timeline_duration

There are certain edge cases where we might be able to convert absolute time units to progress based values, but it would never be complete. If the animation is creating using only percentage values for effect iteration duration, then there is no frame of reference to be able to convert an absolute time value into a progress based value. I think it is more straightforward to simply limit the allowed input types depending on the type of timeline being used.

For time based animations we should add support for certain types of CSSNumericValues. We will need to discuss which CSSNumericValues to support.

Exceptions should be thrown at each point where incompatible input is detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web-animations-2 Current Work
Projects
None yet
Development

No branches or pull requests

2 participants