Stopping Your Animation Loop
Once your requestAnimationFrame
loop starts running, rarely will you ever need to tell it to stop. If you do need to stop your animation loop from doing unnecessary work, you can do something like the following:
Get hands-on with 1400+ tech skills courses.