Home▸Physics & Mechanics▸Bouncing Balls Physics (2D)

🧪 Bouncing Balls Physics (2D)

A flat Canvas 2D ball-pit: gravity, floor/wall restitution and mass-proportional impulse collisions between dozens of balls, with live sliders for gravity, bounciness, ball count and spawn rate.

Physics & Mechanics2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-bouncing-balls-physics ↗ Open standalone

This 2D companion runs the same ball-pit physics as the 3D original — gravity, floor/wall restitution and mass-proportional impulse collisions — on a flat Canvas view instead of an orbiting WebGL scene: a side panel exposes gravity strength, bounciness (coefficient of restitution), the target ball count and the spawn rate, while a live readout tracks total kinetic energy, average ball speed and the collision rate per second, making the effect of each parameter on the system directly legible instead of hidden behind a rotating camera.

⚙ Under the hood

2D Canvas ball-pit with gravity, wall/floor restitution and mass-proportional impulse collisions, tuned live via gravity, restitution, ball-count and spawn-rate sliders.

momentum transferrestitutionelastic collisionsrigid body physics

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)