# skyfox-projection: projection mapping, layers and annotation for the calibrated SkyFOX shot

A single page (no build): the SkyFOX shot c2021 of the Norte Fire beside a 3D terrain (three.js) on which
the current frame is projected from its solved camera, with a depth pass for occlusion; the incident's
layers cast into the video through the pose; a MapLibre map; annotation by clicking the video (each click is a
ray from the camera to the DEM) or the map, exported as GeoJSON or as a STAC item for the incident's
`augmented/` collection, bounded to the flight radius.

- **Production:** https://simtable.acequia.io/incidents/CA-ORC-NORTE/skyfox-20261016/viewer/index.html
  (beside the data it reads, on the same origin as the video)
- **Shots (v0.2.0):** `?shot=c2021` (default; 1,343 frames) or `?shot=c3770` (SkyFOX following CAL FIRE Tanker 12, N476NA, 20:57:48 to 20:58:34 UTC, 1,366 frames), also a selector in the header. Each shot has its own pose file and its own partner-tier clip; a pose file may carry `meta.targets` (ADS-B tracks, drawn as a magenta ring: the tanker in c3770).
- **Parameters:** `?shot=<id>`, `?f=<frame>` (0 to the shot's last frame), `&view=orbit` (start outside the camera, looking at the projected frame).
- **Keys:** `h` home into the solved camera and hold it; `p` toggle the projection; space play; arrows step (shift: 30 frames); Enter finishes a line or polygon.

## v0.4.0 (2026-10-22): `?clip=<id>`, any clip the overnight batch calibrated

`?clip=<id>` opens a clip from the batch calibration (Norte note 21), whichever aircraft filmed it, from its `skyfox-20261016/clips/<id>/poses.json`. It is linked from the clips viewer's **open in 3D**.
- **The video:** the full recording (`pfMF73zeaSQ.webm`, public), read at the clip's own VOD offset (`meta.clip_t0_vod_s`).
- **The page:** the header names the matched aircraft, and the map draws that tail's ADS-B track from `adsb/tracks/<icao>-<reg>.geojson`. The clip opens at its middle frame.
- **Choosing a shot:** picking a shot in the selector leaves clip mode.

## v0.3.0 (2026-10-22): the house chrome and the 3D pane's own fullscreen (Debbie)

Stephen: *"now do the fullscreen 3d for https://simtable.acequia.io/incidents/CA-ORC-NORTE/skyfox-20261016/viewer/index.html?shot=c2021"*.

- **&#x26F6; 3D** sits on the 3D pane (top right). It puts the 3D scene alone in fullscreen, and the header, panels, map, video pane and dock withdraw. **Esc** or the same control brings the page back. Hide-UI withdraws the control.
- **The video gate.** The page already probed the clip (a same-origin HEAD request). The clip is public now, so it opens for everyone. The gate now appears only if the clip fails to load, and it offers the visitor's own copy; the partner sign-in wording is gone.
- **Built on v0.2.0.** v0.2.0 (the c3770 shot) is the SkyFOX JS / Tanker 12 session's work. It was deployed but never committed, so it was committed as found first (`v0.2.0`). The live v0.2.0 files are backed up in the Norte bead, `2026-10-22/artifacts/backups/skyfox-viewer-v0.2.0/`.
- **v0.3.1:** the map's update waits for its sources. A relayout (a panel toggled, a resize) during loading could reach `setData` first; one headless run in eight showed it.
- **Check:** `verify/skyfox-chrome.mjs <url> <outDir> <shot> [width] [scheme]`.

**§4 audit (redfish-style SKILL.md §4, §4e), v0.2.0 against v0.3.0:**

| item | rule | v0.2.0 | v0.3.0 |
|---|---|---|---|
| the page is the instrument; no page scroll | 1, 15 | **fail**: a document. The header, panes, controls, map, readout and four paragraphs of notes scrolled. | **fixed**: `.rf-map-page` fills the viewport. The two panes (16:9, contained) and the map are the stage, and nothing scrolls at 1440 or 390 px. |
| header | 2 | **fail**: a full-width header with a long title, six links and a status line | **fixed**: a `.rf-logo-chip` holding the logo, a short title, the shot selector and the version. The links moved to About and the status to the dock. |
| fullscreen + hide-UI | 3 | **fail**: absent | **fixed**: the `.rf-fab` pair, top right. Hide-UI withdraws everything `.rf-ui`; the restore control, the minimized tabs and the data credit stay. |
| data credit | 3 | **fail**: only MapLibre's Esri line | **fixed**: a quiet line (FOX 11 / KTTV, adsb.lol ODbL, USGS 3DEP via Terrarium, Esri, FIRIS, NASA FIRMS) that hide-UI never withdraws |
| skin | 4 | **fail**: an inline copy of the house variables with an orange accent (`#c2410c`), not the linked sheet | **fixed**: the house sheet is LINKED and the inline palette is gone. The overlay colours drawn on the video are data colours and stay as they were. |
| timeline | 5, 11 | partial: a frame scrubber among other controls | pass for a 45 s shot: a slim dock at the bottom (play, the frame scrubber, h, p). Frame times read in UTC in the video tag and the readout. The shared timeline component is for incident time and is not mounted here. |
| panels minimize | 10, 15d | **fail**: the controls, readout and notes were fixed page real estate | **fixed**: **Layers & annotate**, **Readout**, **About** and **Map** each minimize to a `.rf-min-tab` (`.rf-collapsed`, the house transitions) and are remembered. The text sits in About, collapsed by default (15a, 15d). |
| controls by need | 15b | **fail**: 15 controls in one row | **fixed**: the dock holds what a first visitor needs; layers and annotation open on demand |
| scroll ownership | 9 | pass: the wheel zooms the 3D pane and the map | pass |
| camera | 14 | pass: orbit (OrbitControls) with `h` into the solved camera | pass; the shared orbit-plus-fly controller (`rf-nav.mjs`) is not adopted here |

## Data it reads (none of it lives here)

| What | Where (relative to the page) |
|---|---|
| per-frame poses, flight radius | `../pose/poses.json` (c2021), `../pose/poses_c3770.json` (c3770) |
| the video | `../../partner/skyfox-20261016/skyfox-n93dd-20261016T202839Z-c2021.mp4`, `...T205747Z-c3770.mp4` (public since 2026-10-21: the SkyFOX folder is anonymous-read; the page probes the clip and opens it for everyone; if it fails to load, the visitor opens their own copy) |
| ADS-B track | `../adsb/N93DD-20261016-adsb.geojson` |
| FIRIS perimeters, VIIRS hotspots | the incident STAC (`firis/`, `nasa-firms/` items; VIIRS live from Esri Living Atlas) |
| saved augmented layers | the STAC `augmented/` collection's items (`augment:features`) |
| terrain, imagery | AWS Terrarium tiles (the same heights the solver used), Esri World Imagery (keyless) |

Conventions are calib.js's (nick-weather `01a07ec3`), as Theo's pose file uses them. The camera math, the DEM
ray cast and the Terrarium decode follow Theo's n127bh-verify page and `geo.py` (re-written here, not imported,
because that page is a single module with side effects).

## Provenance (devops)

- Authoring bead: [2026-NorteFire `01a14b88`](https://redfish.acequia.io/guerin/.agents/01a14b88-d846-7a67-b65f-fbc68e399d07/about.md), Theo lane
  ([lane note](https://redfish.acequia.io/guerin/.agents/01a14b88-d846-7a67-b65f-fbc68e399d07/2026-10-17/notes/02-skyfox-calibration.md)); method bead
  [aerial-video-pose (Theo) `01a0b360`](https://redfish.acequia.io/guerin/.agents/01a0b360-28ed-7079-a389-dd94f425efb9/about.md), whose
  [n127bh-verify](https://redfish.acequia.io/guerin/.agents/01a0b360-28ed-7079-a389-dd94f425efb9/repo/n127bh-verify/README.md) is this page's pattern.
- Policy: [devops `64be6d29`](https://redfish.acequia.io/guerin/.agents/64be6d29-d133-4ade-9dce-f62701003e37/about.md): `main` = nightly, a tag = a release, production = the tagged
  tree copied to the viewer folder with a `version.json`; the history face is `repo/skyfox-projection/.git/`.
