# Flower of Life — `flower-of-life@1.0.0`

The Flower of Life drawn in polished gold wire, circle by circle, by a point of light. Loops perfectly.

Sacred geometry in polished metal wire, floating over a soft backdrop with motes of light drifting behind. In the drawing animation each circle is traced by a bright point of light, growing outwards from the centre; the finished pattern holds while light glides across it, then fades away and the loop begins again. In the turning animation the whole pattern turns slowly with pulses of light running round its circles. Choose the pattern (the Flower of Life, the Seed of Life or Metatron's Cube), the metal (gold, rose gold, silver or copper), the animation and the backdrop.

- Kind: object; status: published; digest sha256:71f3d37e8003fa5d7eba8a232ae02fa94c8bbe7a9ee6a200a3408c9cacc79bbd
- Role: Hero object (Three.js 3D): a sacred-geometry emblem for spiritual, wellness and mystical content.
- Implementation: three; entry `src/flower-of-life.js`
- Files: https://aipixelwizard.com/registry/flower-of-life/1.0.0/<path> (`LICENSE`, `asset.json`, `demo.js`, `index.html`, `src/flower-of-life.js`)
- Manifest JSON: https://aipixelwizard.com/api/v1/visuals/flower-of-life/versions/1.0.0
- Runnable demo: https://aipixelwizard.com/registry/flower-of-life/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 physical materials.; `chrome-material@1.1.0` (demo) — Studio environment light and backdrop.; `apw-runtime@1.0.0` (demo) — Demo harness.

## Exports
- `createSacredGeometry({ pattern?, metal?, animation?, wire? }) => { group, extent, counts, update(time, loopSeconds), dispose() }` — The pattern as a THREE.Group in the xy plane (circles of radius 0.5). update(time, loopSeconds) draws, holds and fades it, or turns it.
- `createMotes({ count?, color?, spread?, depth?, seed? }) => { group, update(time, loopSeconds), dispose() }` — Soft motes of light drifting upwards behind the pattern, looping seamlessly.
- `METALS: { gold, rose, silver, copper }` — The finishes, with the colour of their light.

## Parameters
- `pattern` (select one of flower | seed | metatron, default "flower") — Pattern
- `metal` (select one of gold | rose | silver | copper, default "gold") — Metal
- `animation` (select one of draw | spin, default "draw") — Animation
- `background` (color, default "#15112e") — Backdrop
- `motes` (boolean, default true) — Motes of light
- `seed` (integer 1–999, default 9) — Seed: Changes where the motes of light drift.

## Composition
- Inputs: Time within the loop; the pattern, metal and animation.
- Outputs: A THREE.Group in the xy plane facing +z (and optional motes for the background).
- Coordinates: Circles have radius 0.5. The Flower fits within a radius of 1.6, the Seed 1.1, Metatron's Cube 2.5 (extent).
- Lighting: Physical metal: needs scene.environment; a warm key light adds sharper glints. The drawing light is self-lit.
- Timing: update(time, loopSeconds) is a pure function of time; frames render in any order.
- Works with: kinetic-title, chrome-material, particle-tunnel
- Each circle starts drawing at the point nearest the centre, so the pattern grows outwards.
- Metatron's Cube draws its thirteen circles, then its seventy-eight lines.

## Output and loop
- 1080×1080, 30 fps, 12 s, procedural
- Seamless loop: yes — Drawing: the pattern starts and ends each loop empty. Turning: a sixth of a turn per loop (the pattern has sixfold symmetry) with pulses and tilt repeating whole times, so the last frame meets the first.
- Verified 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)); deterministic: yes; loop check: Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255.

## Use it
New project: Set scene.environment (createStudioEnvironment from Chrome Material works), add createSacredGeometry().group facing the camera, and call update(time, loopSeconds) each frame.

Existing project: Copy src/flower-of-life.js. Add the group to your scene, scale it, and call update(seconds, loopSeconds) every frame.

Reuse ideas:
- Meditation intro: the default, with your channel name fading in below once the pattern is complete.
- Wellness brand: Seed of Life in rose gold on blush as a logo sting.
- Mystical background: Turning gold mandala behind a narrator, motes on.

## Limitations
- The patterns are fixed to these three; the circle size is set by scaling the group.
- The drawing order is fixed: centre first, then outwards.

## License
MIT. Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder.
- three.js 0.185.1: MIT (https://github.com/mrdoob/three.js)

Provenance: Adapted from the owner's threejs-sketches/geometry-math/sacred-geometry (MIT), rebuilt for AI Pixel Wizard in October 2026: three patterns in polished wire, drawn on by a point of light in the shader, a gliding glint, a turning mode with light pulses, drifting motes, and the frame/time contract.

