โ† Ages 12+/Game Loop with requestAnimationFrame
๐Ÿ“– Story

Game Loop with requestAnimationFrame

Games redraw the screen 60 times a second. requestAnimationFrame asks the browser for the next frame โ€” clear, move, draw, repeat.

What you'll learn

Build a real animation loop.

New command

requestAnimationFrame(loop)
๐Ÿ’ป Code Editorhtml
๐ŸŽฌ

Press Run Code to see your creation!

โฎ Previous lesson