Re: [csswg-drafts] [web-animations-2] Custom effects (#6861)

@flackr:

> And that if you want to simultaneously animate some css properties you'd generally end up creating multiple animations.

I could be wrong here, but from my experience these cases are quite rare. So I wouldn't mind creating separate effects for those, of course, considering I can sync them together using Groups/Timelines.

> I imagine developers may often animate a custom property which drives the logic of the custom effect.

Using this method isn't really called for if you're just animating CSS properties, unless you're doing hacks that aren't really possible today, like mixing it with Transitions, for delayed effects or velocity-based effects, etc.

> Yeah, the optimization part might end up being a bit non-trivial to implement

OK, I'm mainly coming from an Author POV, and not an expert on the implementation side. So, nothing I can add to that point.

I can only say that the shape of the progress event API with an empty effect seems weird from my side.

-------------------

@bramus:

> My eventual goal is to ditch the `requestAnimationFrame`, which has known performance implications. 

Of course, 100%. 

> A `progress` event would allow that, a CustomEffect would too but it’s a lot of more work.

Again, you guys know the impl. side.

> If there is a progress event, then something like an EmptyEffect would be sufficient, no? As in: create the empty effect + use the progress event listener to update the things onscreen. IUC this would allow the UA to reuse some of its already existing optimizations.

Yeah, impl. wise. And if this resolves in a superior experience for the users then great.

Just hoping we can also get a solid-looking API for authors on the way.

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


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

Received on Thursday, 31 October 2024 21:09:44 UTC