Pour sand, water, and snow — then tilt your phone to flip gravity. A real-time particle physics sandbox that runs entirely in your browser. No install required.
Each frame the simulation steps every particle using simple cellular-automaton rules evaluated on a 2-D grid — no physics engine library needed.
deviceorientation event reports the device tilt angles (beta/gamma). The simulation rotates the gravity vector in real time so particles "fall" toward the low side of the screen.
The grid runs at 80 × 120 cells (scaled to fill the display) so simulation stays fast even on mid-range phones. Cells are drawn via Canvas 2D putImageData for zero-GC pixel blitting.
DeviceOrientationEvent API which is only available on phones and tablets with a real accelerometer. On a laptop or desktop you control particles with mouse drag instead — click and hold to pour, or click once to place a single brush-full. The simulation still has full gravity; it just stays pointing straight down.DeviceOrientationEvent.requestPermission(). Tap "Allow" in the system prompt and tilt gravity activates immediately. The permission is per-session; no data ever leaves your device.