# Iridescent Morphing Blob — `iridescent-blob@1.1.0`

A glossy blob that slowly morphs with a soap-bubble rainbow sheen. Loops perfectly.

A shiny, soft shape that gently swells and ripples like a drop of liquid, with a rainbow oil-slick sheen that shifts as it turns. Pick two colours for the hollows and the peaks, then dial how much it wobbles and how bumpy it is. The movement is built so the last frame flows straight back into the first.

- Kind: object; status: published; digest sha256:b83fa4be71e6ca16e1a8fcb77464f41895158d1151a63de00e1e70aba176d91f
- Role: Hero object: a morphing, iridescent 3D shape.
- Implementation: three; entry `src/iridescent-blob.js`
- Files: https://aipixelwizard.com/registry/iridescent-blob/1.1.0/<path> (`LICENSE`, `asset.json`, `demo.js`, `index.html`, `src/iridescent-blob.js`)
- Manifest JSON: https://aipixelwizard.com/api/v1/visuals/iridescent-blob/versions/1.1.0
- Runnable demo: https://aipixelwizard.com/registry/iridescent-blob/1.1.0/index.html (open over http; it imports sibling packages by relative path)
- Dependencies (exact): `three@0.185.1` (source) — Geometry, physical material with iridescence.; `chrome-material@1.1.0` (demo) — Demo uses createStudioEnvironment; iridescence needs an environment map to show.; `apw-runtime@1.0.0` (demo) — Demo harness.

## Exports
- `createBlob({ radius?, amplitude?, frequency?, cycles?, waves?, seed?, segments?, colorA?, colorB?, material? }) => { mesh, update(phase), dispose() }` — Morphing sphere mesh; call update(phase 0…1) each frame.
- `createIridescentMaterial({ colorA?, iridescence?, roughness? }) => THREE.MeshPhysicalMaterial` — Thin-film iridescent physical material using vertex colours.

## Parameters
- `colorA` (color, default "#8a5cff") — Hollow colour
- `colorB` (color, default "#2ee6d6") — Peak colour
- `wobble` (number 0–0.35, default 0.16) — Wobble: How far the surface moves in and out.
- `bumpiness` (number 0.8–4, default 2.2) — Bumpiness
- `speed` (integer 1–3, default 1) — Speed: Morph cycles per loop.
- `iridescence` (number 0–1, default 1) — Rainbow sheen
- `seed` (integer 1–9999, default 3) — Variation
- `background` (color, default "#08080c") — Background

## Composition
- Inputs: Loop phase 0…1 (frame / durationFrames). Needs scene.environment for the sheen.
- Outputs: A THREE.Mesh whose geometry is rewritten by update(phase).
- Coordinates: Centred on the origin, radius ≈ 1 ± wobble.
- Lighting: Image-based (scene.environment). Without it the iridescence is barely visible.
- Timing: update(phase) is a pure function of phase; frames can be rendered in any order.
- Works with: chrome-material, orbit-camera, gradient-background
- Vertex count is segments × 0.75·segments; 128 is smooth at 1080p.

## Output and loop
- 1080×1080, 30 fps, 8 s, procedural
- Seamless loop: yes — Every wave advances a whole number of cycles and the spin completes whole turns, so frame N equals frame 0.
- Verified 2026-10-03 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 Three.js scene with an environment map, add createBlob().mesh and call update(frame / totalFrames) every frame.

Existing project: Copy src/iridescent-blob.js. Add blob.mesh to your existing scene and call blob.update(phase) from your frame loop. Keep your camera and lights; add an environment map if your scene has none.

Reuse ideas:
- Swap the material for createChromeMaterial to get a liquid-chrome blob.
- Use several small blobs with different seeds as floating background shapes.
- Put it behind a Kinetic Title as a product-launch backdrop.

## Limitations
- Not a fluid simulation: the motion is a sum of waves, which reads as liquid but does not split or merge.

## 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: Original code written for AI Pixel Wizard in October 2026. Demo polished in October 2026 to the catalog quality bar (docs/QUALITY.md).

