Why this particular requestAnimationFrame polyfill? Because most (all?) of the other ones have a hidden flaw: they can't handle multiple, simultaneous animations. See a fuller explanation on this blog ...
UFO Infested Space Rocks is an in-browser Asteroids style game using modern 2020+ JavaScript / ECMAScript and Browser features (async, classes, requestAnimationFrame, audioCtx, gamepad, etc.) with CSS ...