Standalone frame limiter. Set the frames per second (FPS) and let it run.
const animation = new AnimationFrame(10, () => update()); function update() { // do something }
See the example folder for a fully working example.