# AEGIS MK-VII — procedural powered-armour suit

A single self-contained `index.html`: a full humanoid exosuit built entirely from code with Three.js
(primitives, bevelled extrusions, lathes, tube cables). No models, textures or other assets — even the
scratch, carbon and hazard-stripe textures are drawn on canvas at load time.

- **875 distinct mesh parts** (plates, joints, pistons, vents, bolts, cables, lights). On load the page logs `PART_COUNT 875` to the console.
- **Assemble / explode**: parts fly in on swirling arcs with a staggered, bottom-up order and lock into place with a spark flash; explode releases them again.
- **HUD**: targeting reticle (locks onto the part under the cursor or tapped), tracking part labels with leader lines, suit status bars, per-subsystem lock panel and event log.
- **Three.js r160**, pinned via import map to `cdn.jsdelivr.net/npm/three@0.160.0` (needs internet for that one request).

## Run

Open `index.html` in a modern browser, or serve the folder (`python3 -m http.server`) and visit it.
The suit assembles automatically shortly after load.

## Controls

| Input | Action |
|---|---|
| ASSEMBLE / EXPLODE buttons (keys `A` / `E`) | Play the animation in either direction |
| Slider | Scrub the assembly manually |
| ROTATE | Toggle turntable auto-rotate |
| BLOOM | Toggle bloom post-processing |
| Mouse drag / wheel / right-drag | Orbit / zoom / pan |
| Touch: one finger / pinch / two-finger drag | Orbit / zoom / pan |
| Hover (mouse) or tap (touch) a part | Lock the reticle on it and show its ID |

## Performance notes

Shadows are re-rendered only while parts are moving. Pixel ratio is capped at 2; bloom and MSAA are off
by default on touch devices, and an adaptive governor lowers render scale and then bloom if fps stays low.

## Source layout

`index.html` is generated from `src/` by `./build.sh` (simple concatenation); edit the pieces in `src/`
(`10_core.js` helpers/materials, `20_legs.js` … `50_head_pack.js` geometry, `60_finalize.js`, `70_hud.js`,
`80_loop.js`) and re-run the script. `index.html` alone is the deliverable.
