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

Demo

EL