Zero-code zero-G water drop toy: Claude Code builds 2,200-line single-file WebGL demo

AlexisDC · reddit · 2026-09-28

A non-technical Redditor built a "zero-G shape-shifting water drop" digital fidget toy entirely by prompting Claude Opus 5.5 in Claude Code — about 2,200 lines in a single HTML file, zero lines hand-written. The 80mm drop floats in weightlessness, can be poked, pulled, cut, morphs between water and mercury, and reshapes into a cube, impossible triangle, or letter A.

Under the hood (per Claude): no fluid sim or 3D mesh — the surface is 150 summed spherical harmonics wobbling at real Rayleigh-mode frequencies (water's main mode at 0.48 Hz matches textbook values); shapes are ray-marched pixel-by-pixel in custom GLSL shaders (enabling holes like the letter A); per-wavelength dispersion and ray-traced caustics; WebGL 2 with Three.js only for setup.

Admitted cheats: wobble decays 12x faster and ripples play at 40% speed since real dynamics are too fast to see.

Claude's own improvement ideas: plain mesh for the sphere state to ease mobile ray marching, drop Three.js for raw WebGL 2, move to WebGPU for real fluid simulation enabling droplet splitting.

The build order is also instructive: start with a sphere plus material/influence sliders, then add shapes, ripples, physics, and sound incrementally.

Original post →

More from coding & agent

coding & agent channel →