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-1] Use cases for timeline being writable #3759

Open
stephenmcgruer opened this issue Mar 25, 2019 · 4 comments
Open

[web-animations-1] Use cases for timeline being writable #3759

stephenmcgruer opened this issue Mar 25, 2019 · 4 comments

Comments

@stephenmcgruer
Copy link
Contributor

Currently, an Animation's timeline member is writable: https://drafts.csswg.org/web-animations-1/#the-animation-interface

I was wondering what the use cases were for replacing a timeline on an Animation. This came up in the context of https://github.com/WICG/scroll-animations/issues/44 - I'm not committing to any particular thought on that issue at the current time, but it would be a simpler world if timeline were readonly.

@stephenmcgruer
Copy link
Contributor Author

The example given in the scroll-animations issue was "using a ScrollTimeline until you pass some threshold and then swap in a DocumentTimeline so that the animation runs to completion".

This isn't quite a use case (it describes steps instead of describing a goal), and I'm not clear in this description why you wouldn't just cancel the Animation and start a new one at that point. (Also, is it using the same effect, or does one swap that out as well?).

@birtles
Copy link
Contributor

birtles commented Mar 25, 2019

There are a number of hidey bar effects where after passing a certain threshold, the animation proceeds to the end ignoring the scroll progress--a kind of snap-to-end effect. Starting a new animation (especially one where all the units need to be rewritten) at that point seems sub-optimal.

@bradkemper
Copy link
Contributor

@bradkemper
Copy link
Contributor

Having two animations based on length of scroll in existing properties seems simpler than all the scroll timeline values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants