🌍 Public
Viewing a saved revision (read-only)
28ded55eb33a479c9b58725bf3de330d
Bouncing Balls
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 descriptionA modernization of this old bouncing balls example, which I originally developed in 2012.
You can pick up the balls and fling them.