Boucing Ball Using Javascript Request Animation Frame

requestAnimationFrame - The window.requestAnimationFrame() method tells the browser that you wish to perform an animation and requests that the browser calls a specified function to update an animation before the next repaint. The method takes a callback as an argument.

Co-ordinates:




Example 1 Example 2