Balls (hue = spawn order)
Floor / wall contact
This 2D companion runs the same ball-pit physics as the 3D original — gravity, restitution and mass-proportional impulse collisions — on a flat Canvas view instead of an orbiting WebGL scene, with sliders for gravity strength, bounciness, ball count and spawn rate plus a live readout of total kinetic energy, average speed and the collision rate, so the effect of each parameter on the system is immediately legible rather than hidden in a 3D camera angle.