I need to animate translations of elements over paths such as the one shown below:
Right now I am using a requestAnimationFrame
callback that calculates the position on a De Casteljau curve and then sets the element position via an inline CSS translate3d()
.
This works, although it performs worse and is very verbose when compared to CSS animations.
Web Animations seem like a good new option to animate elements when the destination is only known at runtime, but I cannot find anything to modify the animation between the start and end point.
Is it possible to do the above using element.animate()
, or is it no more customisable than a CSS animation?