Hacker News new | ask | show | jobs
by christinecha 3559 days ago
It works for any measurement! That choice is left completely up to the user. Instead of wrapping it in an event handler, you might instead set a variable for 'start time', run animations on requestAnimationFrame, and pass in the current time.