Skip to content

Clockwork Butterfly

A brass steampunk butterfly with open-work wings, gears and a wound spring, beating its wings without running down. Loops perfectly.

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

In Machines & clockwork, Nature & weather, Craft & heritage

Next: Music BoxSurprise me

Clockwork Butterfly 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

4

Beats per loop.

3

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

Info

What it is

A steampunk automaton: a butterfly of polished brass (or gold, silver, copper) with four open-work wings, each cut with round windows and set with a small turning gear, a segmented body with a wound spring and gears on its back, eyes of glass and curled antennae. Its wings beat in whole beats per loop, its gears turn in whole turns and it bobs gently as it hovers. Choose the metal, how many beats a loop holds, the seed, the backdrop and whether the camera drifts.

Reuse it in your own idea

  • Steampunk title: Brass, four beats.
  • Jeweller's loop: Gold, slow.
  • Fantasy opener: Silver, quick.

Which part is reusable

src/clockwork-butterfly.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

  • The wings are flat plates: they do not bend or cast translucent colour.
  • The body is simple spheres and a tube spring, not an anatomically detailed insect.

Technical details

Technical details
Implementation
Three.js 0.185.1 (WebGL) · ES module src/clockwork-butterfly.js
Exports
  • createClockworkButterfly({ metal?, beats?, seed? }) => { group, setProgress(progress), dispose() }
  • METALS: { brass, gold, silver, copper }
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 body lies along z facing +z, the wings spread along x; the butterfly hovers about 2.6 above the floor.

Lighting: A warm key light with a shadow map and the studio environment on the polished metal.

Timing: setProgress(progress) sets every angle; frames render in any order.

Output
1080×1080, 30 fps, 12 s · procedural (computed from the frame number) · seamless loop — The wings beat in sines of a whole number of beats per loop, the gears turn in whole turns, the hover bob is a sine of whole cycles and the camera drift is a sine of the 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
About 40 meshes and one shadow map with anti-aliasing. A few milliseconds 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 -- clockwork-butterfly/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:736e82f3c85f1286…
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/clockwork-butterfly (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original object: seeded open-work wings, gears and a wound spring beating in whole beats per loop.
BinMore like this

Music Box

3D object3DSeamless loop12 seconds

Gyroscope

3D object3DSeamless loop16 seconds

Astrolabe

3D object3DSeamless loop16 seconds

Hourglass

3D object3DSeamless loop16 seconds