useAnimationFrame
useAnimationFrame
runs a callback once every animation frame.
The callback is provided two arguments:
time
, the total duration of time since the callback was first called.delta
, the total duration of time since the last animation frame.