Part 4: Sprites Animation
Sprites Setup
- you will re-open canvas2.html from last lesson and use the background and sprite from that lesson

- Remove the char.onload = draw; & background.onlaod = draw; − we will be using a gameloop with delay to do animation
- click ctrl−s to save the file
Setting variables for movement & update function to do the math
- click ctrl−s to save the file
Set in the draw function the sprite to charX & charY
creation and call of the gameloop function
- click ctrl−s to save the file
You should now be able to see the animation by opening in browser