Workshop › Scorched Earth-style Artillery › Step 5 of 23
Barrels will turn and shells will fly, so the picture is redrawn about 60 times a second by a loop.
```js
function loop() {
draw()
requestAnimationFrame(loop)
}
requestAnimationFrame(loop)
```requestAnimationFrame(loop) runs loop again before the next screen refresh.Replace draw() at the bottom with loop and requestAnimationFrame(loop).
Skills: The game loop