# Möbius Flow — `mobius-flow@1.0.0`

A glass Möbius strip with a glowing edge and a river of beads that takes two laps to get home. Loops perfectly.

A Möbius strip: a band with one half-twist, so it has only one side and one edge. A river of glowing beads runs along it in lanes, and because the strip is one-sided every bead makes two laps to come back to where it began, passing from what looks like the top to what looks like the bottom and back. The glass-like strip turns slowly while its single edge glows. Choose the number of beads, the colours (aurora, ember, pearl or mono), the width of the strip, how many double laps the beads make per loop, the turns of the strip, the seed, the backdrop colour and whether the camera sways.

- Kind: object; status: published; digest sha256:068b3f34b5b036bf6e1e1751c62f4fa27876d0c87545b7c6ca40f83e03648d86
- Role: Object (3D, three.js): a topology showpiece with a satisfying flow, for maths, science and abstract design content.
- Implementation: three; entry `src/mobius-flow.js`
- Files: https://aipixelwizard.com/registry/mobius-flow/1.0.0/<path> (`LICENSE`, `asset.json`, `demo.js`, `index.html`, `src/mobius-flow.js`)
- Manifest JSON: https://aipixelwizard.com/api/v1/visuals/mobius-flow/versions/1.0.0
- Runnable demo: https://aipixelwizard.com/registry/mobius-flow/1.0.0/index.html (open over http; it imports sibling packages by relative path)
- 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.

## Exports
- `createMobiusFlow({ beads?, palette?, width?, laps?, turns?, seed? }) => { group, setProgress(progress), dispose() }` — The strip, its glowing edge and the beads as a group about 6 across, centred on the origin; needs an environment map.
- `PALETTES: { aurora, ember, pearl, mono }` — Colours for the strip, the beads and the edge.

## Parameters
- `beads` (integer 20–300, default 120) — Beads
- `palette` (select one of aurora | ember | pearl | mono, default "aurora") — Colours
- `width` (number 0.6–1.4, default 1) — Strip width
- `laps` (integer 1–3, default 1) — Double laps per loop
- `turns` (integer 0–3, default 1) — Strip turns per loop
- `seed` (integer 1–999, default 10) — Seed
- `background` (color, default "#10141f") — Backdrop
- `orbit` (boolean, default true) — Camera sway

## Composition
- Inputs: Time within the loop; the beads, colours, width, laps, turns, seed, backdrop and camera sway.
- Outputs: A full frame rendered in 3D with a studio environment.
- Coordinates: The strip's core circle has radius 2.2 and it is hung 3.3 above the floor; its half-width is 0.95 × the width setting.
- Lighting: A warm key light with a shadow map and the studio environment on the glass; the beads and edge are self-lit.
- Timing: setProgress(progress) places every bead and turns the group; frames render in any order.
- Works with: chrome-material, orbit-camera, kinetic-title, number-reveal
- A bead's position after two turns round (u + 4π) is the same as its start, so beads make double laps; the edge curve is a single closed line of length 4π.

## Output and loop
- 1080×1080, 30 fps, 16 s, procedural
- Seamless loop: yes — Each bead makes a whole number of double laps (it comes back to the same place after two turns round a one-sided strip), the strip turns a whole number of times per loop and the camera sway is a sine of the loop, so the last frame meets the first.
- Verified 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)); deterministic: yes; loop check: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.

## Use it
New project: Create a WebGLRenderer with a studio environment, add createMobiusFlow().group and call strip.setProgress(progress) each frame.

Existing project: Copy src/mobius-flow.js; add the group to your scene with an environment map.

Reuse ideas:
- Infinity brand: Aurora, 120 beads.
- Warm: Ember, wide.
- Calm: Pearl, two laps.

## Limitations
- The strip is translucent without true refraction; beads show through it.
- A faint seam can show where the strip's ends join.

## License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder.

Provenance: Adapted from the owner's threejs-sketches/geometry-math/mobius-flow (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original studio object: a translucent iridescent strip, its single glowing edge and beads on lanes making double laps with a whole-turn rotation, on an exact loop.

