Skip to content

Caustic Dance

The bright, shifting net of light on the floor of a swimming pool, sliding over wobbling tiles. Loops perfectly.

Background, V1 Effects3DSeamless loop, verified249 lines of codev1.0.0

In Light, glass & shine, Liquids

Next: Torus Wave LoopSurprise me

Caustic Dance preview
Starting live preview…
00:00:00:00 / 00:00:00:01

Live, running the real source at reduced resolution.

Your current settings go with it. Combine several clips and hand them over together from your sequence.

Effect controls

Presets

1
1
11

Higher makes thinner lines.

1

The preview runs the same code your AI receives. These settings travel with the hand-off.

Info

What it is

The dancing net of sunlight on the floor of a pool: ripples on the surface bend the light into a lattice of thin bright lines that slides, splits and rejoins over blue tiles, which themselves wobble as the water bends them. Choose the water (turquoise, deep blue, lagoon or sunset), tiles on or off, the size of the net, its brightness and how thin its lines are, and how much the tiles wobble.

Reuse it in your own idea

  • Summer or travel background: Turquoise pool tiles.
  • Spa or wellness loop: Lagoon, no tiles.
  • Evening title: Sunset water.

Which part is reusable

src/caustic-dance.js is the ingredient your AI reuses. demo.js is only the example scene around it, and uses the demo harness only for the demo.

Good to know

  • The pattern is a stylised formula, not a ray-traced caustic: it does not respond to an actual surface.
  • The floor is flat and seen from straight above.

Technical details

Technical details
Implementation
Three.js 0.185.1 (WebGL) · ES module src/caustic-dance.js
Exports
  • createCausticPool({ water?, tiles?, scale?, brightness?, wobble?, sharpness? }) => { scene, camera, setSize(width, height), update(time, loopSeconds), dispose() }
  • createBloomPass(renderer, { width, height, glow?, exposure?, grain? }) => { render(scene, camera, output?), dispose() }
  • WATERS: { turquoise, deep, lagoon, sunset }
Dependencies (exact)
  • three@0.185.1 (source) — Renderer, geometry and shader materials.
  • apw-runtime@1.0.0 (demo) — Demo harness.
How it fits a scene

Coordinates: Square-ish tiles about 1/7 of the frame high, seen from straight above.

Lighting: Self-lit: the water's colour for the floor, the light's colour added where the caustic lines are; the bloom adds the glare.

Timing: update(time, loopSeconds) sets the loop phase; frames render in any order.

Output
1080×1080, 30 fps, 12 s · procedural (computed from the frame number) · seamless loop — Every layer of the light and the wobble of the tiles are folded sines whose frequencies are whole numbers of cycles per loop, so the last frame meets the first.
Tested
Rendered 360 frames on 2026-10-06 in Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0 (WebGL 2 via SwiftShader (software)). Same frame twice from fresh pages: identical. Loop: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.
Performance
One full-screen pass with ten warp rounds per pixel and a small bloom. A few milliseconds a frame at 1080p on an integrated Intel GPU. Software WebGL renders in about a second a frame.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- caustic-dance/1.0.0 --out my-video.mp4Needs Node 18+, ffmpeg and Chrome/Chromium. Add --params my-settings.json (from Copy settings) for your own settings.
Version
1.0.0 · sha256:dd2f4af5003ef53a…
Files
License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder. License details
Provenance
Adapted from the owner's threejs-sketches/light-atmosphere/caustic-dance (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original shader: a folded-sine caustic with whole-cycle time factors, wobbling pool tiles and an exact loop.
BinMore like this

Lava Lamp

3D object3DSeamless loop15 seconds

Soap Film

3D object3DSeamless loop12 seconds

Ferrofluid

3D object3DSeamless loop16 seconds