Skip to main content
100%

Bouncing Balls

✓ Published0🌍 Public
CCurran Kelleher
Last edited Oct 9, 2025
Created on Oct 2, 2023
Forked from HTML Starter

Ten colorful circles bounce around a canvas, affected by gravity and repelling each other when they touch. Users can click and drag any ball to fling it, with a spring-like pull force applied toward the mouse cursor. The simulation runs on HTML5 Canvas with requestAnimationFrame, using physics calculations for velocity, dampening, and collision detection between boundaries and other circles.

AI-generated description

A modernization of this old bouncing balls example, which I originally developed in 2012.

You can pick up the balls and fling them.

MIT Licensed

Similar vizzes