jargon

Frontend & browser·JavaScript in the browser

you moved the animation out of `setInterval` and it finally stopped stuttering at odd moments.

requestAnimationFrame

Also calledrAF, animation frame callback

A callback scheduled to run immediately before the next paint, at the display's refresh rate, and suspended entirely in a background tab. It is the correct place for any visual update driven by script, because the work lands in the same frame as the paint that shows it. It gives you the frame budget too: whatever the callback does, layout and paint still have to fit in the same sixteen milliseconds.

Commonly confused with