What are the Performance/Efficiency implications of updating a Web Animation's currentTime property continuously within milliseconds?
What I would like to do is tie a web animation's current point in its timeframe to the user panning their finger across the screen. Normally, this is done with calling requestAnimationFrame from a pointer move event and setting the css properties directly on the element. But, I'd like to use web animations instead.
let animatedObj = animatedEl.animate(props, timing)
animatedObj.pause()
el.addEventListener('pointermove', (event) => {
animatedObj.currentTime = (.... percentage of pointer position ....)
})
But is it more prone to jank or battery energy intensive than requestAnimationFrame and setting css properties directly? Is setting currentTime not designed for continually updating within ms? Would it be better to use requestAnimationFrame while still setting the animation's currentTime?