Guide
Open the page; the ball starts bouncing on its own.
The motion simulates gravity and loses a little energy on each bounce.
Resize the window and the canvas adapts.
Demo
EL