Skip to content

Glazed Galaxy

Dozens of rainbow-glazed donuts spiral round a big one at the centre like a galaxy, tumbling as they go. Loops perfectly.

3D object, V2 Objects3DSeamless loop, verified131 lines of codev1.0.0

In Space & cosmos, Food & sweets, Toys, games & parties, Patterns & illusions

Next: Domino SpiralSurprise me

Glazed Galaxy 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

64
3
0.9
1
8

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

Info

What it is

A galaxy made of donuts: dozens of small glazed donuts swirl round a big one at the centre along the arms of a spiral, the inner ones racing and the outer ones drifting, each tumbling as it goes and every glaze a different colour of the rainbow. Choose the number of donuts, the number of spiral arms, how strong the glaze colours are, how many laps the outermost donuts make per loop, the seed, the backdrop colour and whether the camera sways.

Reuse it in your own idea

  • Playful brand: Three arms, rainbow.
  • Soft: Pastel, many.
  • Energetic: Fast laps, two arms.

Which part is reusable

src/glazed-galaxy.js is the ingredient your AI reuses. demo.js is only the example scene around it, and uses chrome-material only for the demo.

Good to know

  • All frostings share one shape, tinted differently.
  • Donuts may overlap where arms cross near the centre.

Technical details

Technical details
Implementation
Three.js 0.185.1 (WebGL) · ES module src/glazed-galaxy.js
Exports
  • createGlazedGalaxy({ count?, arms?, saturation?, laps?, seed? }) => { group, setProgress(progress), dispose() }
Dependencies (exact)
  • three@0.185.1 (source) — Renderer, geometry and shader materials.
  • chrome-material@1.1.0 (demo) — Studio environment light, backdrop and contact shadow.
  • apw-runtime@1.0.0 (demo) — Demo harness.
How it fits a scene

Coordinates: The big donut sits at the origin (height 1.1); small donuts orbit at radius 2.6–7.2 in the xz plane; the camera looks down at about 52°.

Lighting: A warm key light with a shadow map, a shadow-catching floor and the studio environment.

Timing: setProgress(progress) places every donut on its orbit; frames render in any order.

Output
1080×1080, 30 fps, 16 s · procedural (computed from the frame number) · seamless loop — Every donut makes a whole number of laps per loop and turns a whole number of times, its tilts and bob are sines of whole cycles and the camera sway is a sine of the loop, so the last frame meets the first.
Tested
Rendered 480 frames on 2026-10-05 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
Two instanced draw calls of up to 121 donuts with a shadow map: about a millisecond a frame 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 -- glazed-galaxy/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:323062582b53f6d6…
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/objects-scenes/glazed-galaxy (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original studio object: instanced baked-dough donuts with a shared wavy frosting strip orbiting along logarithmic spiral arms with whole laps per loop.
BinMore like this