Skip to content

Torus Wave Loop

Glowing rings around a slowly turning doughnut, with a wave rippling through them. Loops seamlessly.

Effect, V1 Effects2DSeamless loop, verified90 lines of codev1.1.0

In Science & maths, Food & sweets, Light, glass & shine, Liquids, Patterns & illusions

Next: Faraday WaveSurprise me

Torus Wave Loop preview
Starting live preview…
00:00:00:00 / 00:00:00:01

Live, running the real source.

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

Effect controls

Presets

44
3

Number of swells around the doughnut.

1

Wave cycles per loop.

1

Turns of the doughnut per loop.

0.32
1.15
1.6

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

Info

What it is

Dozens of thin neon rings sit around a doughnut shape. A wave swells through them while the whole form turns, creating that calm, mesmerising wireframe look. Pick two colours, the number of rings and waves, and how much they swell. Everything is drawn as simple lines, so it stays crisp at any size.

Reuse it in your own idea

  • Draw it small (scale 0.4) in a corner as an animated logo mark.
  • Use one colour and spins 0 as a calm breathing loader.
  • Layer it over Soft Gradient Background for a richer backdrop.

Which part is reusable

src/torus-wave.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

  • Lines are not depth-sorted; additive blending hides most of this.

Technical details

Technical details
Implementation
Canvas 2D — plain browser JavaScript, no libraries · ES module src/torus-wave.js
Exports
  • createTorusWave({ rings?, waves?, cycles?, spins?, amplitude?, tilt?, colorA?, colorB?, lineWidth?, scale? }) => { draw(ctx, info, width, height) }
Dependencies (exact)
  • apw-runtime@1.0.0 (demo) — Demo harness. src/torus-wave.js has no dependencies.
How it fits a scene

Coordinates: Centred; size is 27% of the shorter side × scale.

Lighting: Additive blending; use a dark background.

Timing: Pure function of progress.

Output
1080×1080, 30 fps, 8 s · procedural (computed from the frame number) · seamless loop — Whole wave cycles and whole turns per clip.
Tested
Rendered 240 frames on 2026-10-03 in Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0 (Canvas 2D). Same frame twice from fresh pages: identical. Loop: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.
Performance
64 rings × 56 segments of lines per frame; light. Above ~140 rings lines start to merge visually.
Export a video yourself
Download the source, then in the folder: npm install npm run render -- torus-wave/1.1.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.1.0 · sha256:5c48a571a3815a9a… · other versions: 1.0.0
Files
License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder. License details
Provenance
Original code written for AI Pixel Wizard in October 2026. Demo rebuilt in October 2026 to the catalog quality bar (docs/QUALITY.md).
BinMore like this

Lava Lamp

3D object3DSeamless loop15 seconds