# Hologram — `hologram@1.0.0`

A sci-fi hologram hovering over a metal projector: a dot-matrix Earth, a DNA helix or your message, in glowing scan lines. Loops perfectly.

A projection of light floats above a turned metal emitter: drawn in drifting scan lines with a bright rim, lit by a beam rising from the lens with dust floating up through it, and torn sideways now and then by a glitch that splits its colours. Choose the subject: a dot-matrix Earth (real coastlines) with flight paths arcing between cities, a turning DNA double helix, or a message panel with your title and a live signal trace, lettered in a squared sci-fi face. Pick the colour, how often it glitches and flickers, and the room colour. The hologram's light pools on the floor and catches the projector's edges.

- Kind: object; status: published; digest sha256:0fe820b77ccb39eb687be9423e70a9e45c37dff912b19e45c58ffbd716501a52
- Role: Hero object (Three.js 3D): a futuristic hologram for tech, science and sci-fi intros.
- Implementation: three; entry `src/hologram.js`
- Files: https://aipixelwizard.com/registry/hologram/1.0.0/<path> (`LICENSE`, `asset.json`, `demo.js`, `index.html`, `src/hologram.js`)
- Manifest JSON: https://aipixelwizard.com/api/v1/visuals/hologram/versions/1.0.0
- Runnable demo: https://aipixelwizard.com/registry/hologram/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 the hologram shaders.; `chrome-material@1.1.0` (demo) — Studio environment light and the room backdrop.; `apw-runtime@1.0.0` (demo) — Demo harness.

## Exports
- `createHologramProjection({ subject?, color?, title?, subtitle?, arcs?, spin?, lift?, seed? }) => { group, uniforms, lift, top, update(time, loopSeconds), dispose() }` — The hologram itself (subject, beam, lens glow and rising dust) for a hologram-only scene, with the projector's lens at its origin.
- `createProjector({ color?, metal? }) => { group, lights, lensY, radius, dispose() }` — The metal emitter, for the solid scene; its status lights go in the hologram scene.
- `createHologramPass(renderer, { width, height, glow?, split?, grain?, exposure? }) => { render({ scene, holoScene, camera, level?, tears?, output? }), dispose() }` — Renders the solid scene and the hologram layer, then glows, tears, colour-splits and tone-maps them into the final frame.
- `hologramSignal({ loopSeconds, glitch?, flicker?, seed? }) => { level(time), tears(time) }` — Seeded flicker and glitches over a loop, as pure functions of time.
- `holoGlyphs(text, { tracking? }) => { width, strokes }` — The squared sci-fi lettering as stroke paths, for drawing text in the same face.
- `HOLO_COLORS: { cyan, green, amber, red, violet }` — Suggested hologram colours.

## Parameters
- `subject` (select one of globe | dna | message, default "globe") — Subject
- `color` (color, default "#43d6ff") — Hologram colour
- `title` (text, default "SYSTEM ONLINE") — Message: Shown when the subject is Message, in capitals: letters with accents, numbers and common punctuation.
- `subtitle` (text, default "All channels secure") — Small line: Shown above the message.
- `arcs` (boolean, default true) — Flight paths on the Earth
- `glitch` (number 0–1, default 0.35) — Glitches
- `flicker` (number 0–1, default 0.3) — Flicker
- `background` (color, default "#070b14") — Room colour
- `seed` (integer 1–999, default 7) — Seed: Changes when the glitches and flickers happen.

## Composition
- Inputs: Time within the loop; the subject, colour, texts and seed.
- Outputs: Two groups: the projector for the solid scene, the hologram for a hologram-only scene; createHologramPass draws both into the final frame.
- Coordinates: The projector stands on y = 0 and is 1.93 units across; the hologram's centre floats 1.6 units above the lens and the Earth has a radius of 1.
- Lighting: The projector is physical metal and needs scene.environment. The hologram emits light; add a PointLight in its colour above the lens so it lights the floor and the projector.
- Timing: update(time, loopSeconds) and the signal are pure functions of time; frames render in any order.
- Works with: kinetic-title, particle-tunnel, orbit-camera
- Message texts are treated as private: not stored in shared packs unless you choose to include them.
- The lettering is a stroke face built into the code: capital letters with the common accents, digits and punctuation.
- Coastlines come from Natural Earth (public domain) at 1° resolution, built into the code.

## Output and loop
- 1080×1080, 30 fps, 12 s, procedural
- Seamless loop: yes — The subject turns whole turns, the arcs, dust, scan lines and signal trace repeat a whole number of times, and the glitches and flickers are scheduled round 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 solid scene (room, floor, createProjector) and a hologram scene (createHologramProjection), then each frame call update(time, loopSeconds) and createHologramPass(...).render({ scene, holoScene, camera, level, tears }).

Existing project: Copy src/hologram.js. Put the projection in its own scene above any object of yours, and draw your scene through createHologramPass so the hologram glows and glitches without touching the rest.

Reuse ideas:
- Global network intro: the Earth briefing preset with your title over the top of the frame.
- Science explainer: the DNA lab preset as a cutaway while you talk.
- Sci-fi story beat: the Incoming message preset with your own message, glitches up.

## Limitations
- The Earth shows land from 1:110m Natural Earth outlines: small islands are missing.
- Message lettering covers A–Z with the common accents (á à â ã ä å ç), 0–9 and common punctuation; other characters are skipped.

## 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)
- Natural Earth 1:110m land: Public domain (https://www.naturalearthdata.com)

Provenance: Adapted from the owner's threejs-sketches/light-atmosphere/webgpu-hologram (MIT), rebuilt for AI Pixel Wizard in October 2026 in WebGL: a turned metal projector, three subjects (a dot-matrix Earth from Natural Earth coastlines with flight arcs, a DNA helix, a lettered message panel), a lit beam with rising dust, seeded glitches and flicker, and the frame/time contract.

