"Create the most beautiful HTML file you could think of. Something that when people see it, all they can say is 'WOW!!!' It must be visually impressive, beautiful, and just music to the eyes. Be thorough, but creative. Don't make mistakes."
A real-time, GPU-accelerated fluid simulation that paints with light and answers with generative ambient music. One HTML file. No build step, no dependencies, no npm install.
This page was written in a single pass by Claude Fable 5.1 (high effort) from the one prompt quoted above. Everything below — the Navier–Stokes solver, the shader chain, the five generative music engines, the six palettes — came out of that single response.
It is one self-contained index.html: ~51 KB, ~1,100 lines, zero third-party JavaScript.
Drag your pointer across the screen and you push a real fluid around — velocity is advected, vorticity is confined, pressure is solved by Jacobi iteration, and colored dye is carried along for the ride. Everything renders through a bloom pass with film grain and a vignette on top.
The sound is not a file. Every note is synthesised live in the Web Audio API: drones, plucks, bells and delay lines built from oscillators and gain envelopes, tuned to the palette you are looking at. Your gestures play it.
Leave it alone and three autonomous "spirits" take over, painting slow figures across the canvas so the piece never sits still.
Fluid simulation (WebGL 2)
- Semi-Lagrangian advection, vorticity confinement, Jacobi pressure projection
- Separate simulation and dye resolutions (192 / 1200 on desktop, 128 / 640 on mobile)
- Multi-tap bloom with threshold + knee, film grain, vignette, dithered output
- Adaptive quality: lower resolutions and fewer pressure iterations on mobile
Six palettes — Aurora · Ember · Ocean · Orchid · Prism · Moonlight
Five generative music modes
| Mode | Character |
|---|---|
| Drift | Eight long tones on incommensurate loops, after Eno's tape pieces (D major) |
| Pulse | Slow arpeggio sequencer, ping-pong delay, bass and a heartbeat (A minor) |
| Abyss | Deep, sparse and low (E minor) |
| Halo | Bright and suspended (A major) |
| Silence | Interaction sounds only |
Interaction — multi-touch painting, tap-to-pulse, keyboard bursts, PNG capture, fullscreen, auto-hiding UI when idle.
| Input | Action |
|---|---|
| Drag / touch | Paint into the fluid |
| Tap / click | Pulse |
Space |
Burst of random splats |
P |
Next palette |
1–6 |
Jump to a palette |
M |
Toggle sound |
N |
Next music mode |
C |
Clear the field |
S |
Save a PNG |
F |
Fullscreen |
H |
Hide the interface |
git clone https://github.com/MiaAI-Lab/Claude-Fable-5.1-Beautiful-HTML.git
cd Claude-Fable-5.1-Beautiful-HTMLThen just open index.html in a browser — or serve it if you prefer:
python3 -m http.server 8000 # → http://localhost:8000A browser with WebGL 2 and hardware acceleration: current Chrome, Firefox, Safari or Edge. Without WebGL 2 the page shows a graceful fallback message instead of a blank canvas. Audio starts on your first interaction, as browsers require.
Generated by Claude Fable 5.1 (high effort) via Claude Code. Fonts: Cormorant Garamond and Inter, from Google Fonts.
MIT
0 comments
log in to comment.