Pink rubber spheres fall. They pile up. You flush them. They fall again.
fallflush is a browser-based real-time physics simulation. Pink rubber spheres spawn at the top of the screen at irregular intervals and fall under simulated gravity, bouncing off the floor and each other as they accumulate. A FLUSH button at the bottom eliminates all spheres with a satisfying whoosh and immediately resumes spawning.
There is no goal. There is no score. There is no way to win or lose. The spheres fall. You may flush them. They will continue falling.
Each sphere has position, velocity, and radius. Gravity is applied every animation frame. Collisions are detected between sphere pairs and resolved using velocity impulse exchange with a restitution coefficient tuned for that particular rubber feeling. Floor collisions produce a bounce with damping. Wall collisions redirect velocity.
The rubber squish effect is achieved through CSS transform scale: on significant impact, a sphere briefly compresses along the vertical axis and expands horizontally, then recovers over 280 milliseconds using an ease-out cubic curve. Settled spheres near the floor maintain a small persistent squish to suggest the weight of the spheres above.
The FLUSH sound is generated entirely by the Web Audio API without any audio files. White noise is run through a bandpass filter whose frequency sweeps from 2400 Hz to 160 Hz over 0.72 seconds with a sharp attack and exponential decay. No sound libraries. No audio files. Just math.
Spheres spawn in batches of 1 to 3 every 340 milliseconds, at positions distributed with a slight bias toward the center of the screen. The system caps at 130 simultaneous spheres to maintain performance, which takes approximately 44 seconds to reach at average spawn rates.
Primarily for the feeling of pressing FLUSH. It is a very good button.