Re: [csswg-drafts] [css-animations-2][web-animations-2] Staggering children of effects inside GroupEffect (#9561)

Looks great. I think this approach allows the start times to be staggered using, e.g. a logarithmic function, without requiring the same sort of easing apply to the duration of each child animation.

That is, in some cases you'll want the whole scene to progressively get faster in which case you can apply easing to the group. That way the start times will get progressively closer together and the child durations will get progressively shorter.

In other cases, however, you want to maintain the same duration for each child animation but simply have their start times get progressively closer together. 

I think the approach you've outlined allows both effects to be achieved.

Having part of the `group-effect-align` shorthand map to the parent group and part map to the children is a little odd, but we already do something similar with animations where part of the `animation` shorthand maps to the `CSSAnimation` boject while most maps to the `KeyframeEffect` object.

Just to check, I believe you are proposing that `group-effect-align-offset` will be computed into the `delay` of the corresponding `CSSAnimation` objects' `KeyframeEffect`s such that JS authors won't have to try to serialize/parse strings like `start calc(100ms * log(effect-count - effect-index + 1))`. To produce a similar stagger effect in JS, authors would use JS math functions to calculate the appropriate delays.

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


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

Received on Monday, 6 November 2023 08:12:01 UTC