Bounce(Gavity) an Image
We will now bounce our image around the screen. Follow the steps below
- Change some of the velocites
var xVol = 9;
- Change the setTimeout
- Change the gravity
- Lets try something, comment out the ctx.clearRect function by placing two slashes in front of it.
// ctx.clearRect(0, 0, canvas.width, canvas.height);