# Physical Lights — `physical-lights@1.0.0`

Coloured point lights circling over a polished wooden floor and a ring of metal objects, with bloom. Loops perfectly.

Coloured lights circling over a polished wooden floor and a ring of metal objects. Real point lights (red, green and blue by default, with physically based falloff) orbit at different heights and speeds; where their pools overlap on the boards the colours mix, on the metal they slide across as sharp coloured reflections, and each light is a small glowing bead that blooms. Choose the number of lights, the colours (rgb, warm, cool or neon), the objects (mixed metals or all spheres), how strong the lights are, the base laps per loop, the seed, and whether the camera sways.

- Kind: object; status: published; digest sha256:a099d6fc78ea458bfad46d5992989c877326de1dbc144a75f1c3ba31790baa05
- Role: Scene (3D, three.js): a showcase of coloured light on metal and wood, for product, music and moody content.
- Implementation: three; entry `src/physical-lights.js`
- Files: https://aipixelwizard.com/registry/physical-lights/1.0.0/<path> (`LICENSE`, `asset.json`, `demo.js`, `index.html`, `src/physical-lights.js`)
- Manifest JSON: https://aipixelwizard.com/api/v1/visuals/physical-lights/versions/1.0.0
- Runnable demo: https://aipixelwizard.com/registry/physical-lights/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
- `createLightShow({ lights?, palette?, objects?, power?, laps?, seed? }) => { group, setProgress(progress), dispose() }` — The floor, six metal objects and the orbiting lights with their beads, about 14 across, the floor on y = 0; needs a dim environment map and a bloom pass.
- `createBloomPass(renderer, { width, height, glow?, exposure?, grain? }) => { render(scene, camera, output?), dispose() }` — A small bloom with an anti-aliased, depth-tested scene target.
- `PALETTES: { rgb, warm, cool, neon }` — Light colour sets.

## Parameters
- `lights` (integer 1–6, default 3) — Lights
- `palette` (select one of rgb | warm | cool | neon, default "rgb") — Colours
- `objects` (select one of mixed | spheres, default "mixed") — Objects
- `power` (number 0.5–2, default 1) — Light power
- `laps` (integer 1–3, default 1) — Base laps per loop
- `seed` (integer 1–999, default 17) — Seed
- `orbit` (boolean, default true) — Camera sway

## Composition
- Inputs: Time within the loop; the lights, colours, objects, power, laps, seed and camera sway.
- Outputs: A full frame rendered in 3D through an anti-aliased bloom.
- Coordinates: The floor (60 across) lies on y = 0; the objects stand in a ring of radius 4.6–5.1; lights orbit at radii 2.2–6.5 and heights 2.4–3.3.
- Lighting: Up to six physically based point lights (decay 2) plus a faint studio environment for the metals; each light carries a self-lit bead.
- Timing: setProgress(progress) places each light and turns each object; frames render in any order.
- Works with: chrome-material, orbit-camera, kinetic-title, number-reveal
- No shadow maps are used, so the lights cost little; the boards are drawn once on a canvas.

## Output and loop
- 1080×1080, 30 fps, 16 s, procedural
- Seamless loop: yes — Each light makes a whole number of laps per loop (the lights differ by whole laps and alternate directions), bobs by whole cycles, and every object turns a whole number of times, and the camera sway is a sine of the loop, 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: Create a WebGLRenderer, give the scene a dim environment map, add createLightShow().group and call show.setProgress(progress) each frame; render with createBloomPass(renderer, { width, height }).

Existing project: Copy src/physical-lights.js; add the group to your scene with a dim environment map and render through createBloomPass.

Reuse ideas:
- Lighting brand: RGB, mixed metals.
- Warm hospitality: Warm, four lights.
- Club: Neon, six lights, spheres.

## Limitations
- Metals reflect the lights and a faint environment, not each other.
- There are no shadows, so the objects do not cast light-coloured shadows on the floor.

## 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/lighting-materials/physical-lights (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original scene: physically based coloured point lights orbiting by whole laps over a canvas-drawn wooden floor and six metal objects, through a bloom, on an exact loop.

