- From: Brian Birtles via GitHub <sysbot+gh@w3.org>
- Date: Sat, 03 May 2025 03:39:46 +0000
- To: public-css-archive@w3.org
> > However, taking this a step further, I wonder if it is possible to have triggers be entirely independent of animations such that they exist as external mechanisms that simply call play(), pause(), cancel() etc. on their target animations. I think that would produce behavior that is easy to reason about for all cases. > > This matches how I had been thinking about it and I think it might be possible with a [proposal](https://github.com/explainers-by-googlers/scroll-triggered-animations/blob/main/PROPOSAL.md) I've just uploaded. Thanks. I had a read and I think that's pretty close to what I was imagining. However, I wonder if `Animation.enableTrigger` is even needed? Why can't that be a method on the trigger itself? i.e. `AnimationTrigger.enable()`? > On creating but not playing an animation, I think if you don’t play but you call `enableTrigger` we should play the animation when the trigger's condition is met. On getAnimations, we can specify that an inactive trigger does not make an animation relevant but any other state will. I don't follow why that clarification is needed. If `enableTrigger` is not called, the animation won't be relevant, right? If `enableTrigger` is called—putting the animation in a kind-of paused state—then it will be relevant and should be returned by `getAnimations`. -- GitHub Notification of comment by birtles Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12119#issuecomment-2848405457 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 3 May 2025 03:39:47 UTC