serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibWeb: Support Element.animate()

Open awesomekling opened this issue 2 years ago • 3 comments

Let's make CSS animations more programmable!

https://www.w3.org/TR/web-animations-1/#dom-animatable-animate

Funding

  • We're currently trying Polar.sh where you can help fund the work on this issue.
  • Contributor(s) receive the funding once the issue is completed & confirmed.
Fund with Polar

awesomekling avatar Oct 24 '23 08:10 awesomekling

This feature would also allow us to play the animation on https://beta.strawberry.rocks/ that follows the cursor.

ADKaster avatar Feb 01 '24 14:02 ADKaster

This feature would also allow us to play the animation on https://beta.strawberry.rocks/ that follows the cursor.

Looks like this will require some work on interpolation as well, specifically with transforms that don't have the exact same shape:

40276.328 WebContent(500868): Interpolated value for property transform at 0.1945: translate(-50%, -50%) -> translate(calc(-50% + -174px), calc(-50% + -327.5px)) = translate(-50%, -50%)
40276.328 WebContent(500868): Interpolated value for property transform at 0.1945: translate(-50%, -50%) -> translate(calc(-50% + -178px), calc(-50% + -325.5px)) = translate(-50%, -50%)
40276.328 WebContent(500868): Interpolated value for property transform at 0.1855: translate(-50%, -50%) -> translate(calc(-50% + -178px), calc(-50% + -324.5px)) = translate(-50%, -50%)
40276.328 WebContent(500868): Interpolated value for property transform at 0.1855: translate(-50%, -50%) -> translate(calc(-50% + -183px), calc(-50% + -320.5px)) = translate(-50%, -50%)
40276.328 WebContent(500868): Interpolated value for property transform at 0.1855: translate(-50%, -50%) -> translate(calc(-50% + -187px), calc(-50% + -314.5px)) = translate(-50%, -50%)

mattco98 avatar Feb 05 '24 01:02 mattco98

I think we should be able to handle interpolation in a separate issue then, and keep this one about Element.animate rather than expanding the scope to the beta.strawberry.rocks page working correctly :)

ADKaster avatar Feb 05 '24 10:02 ADKaster