# Digital Micrometer tutorial

The finished `DigitalMicrometer-tutorial.mp4` is one level above this folder, beside the simulation's `index.html`. This folder holds its thumbnail, captions, narration, editable storyboard, recording scripts, and upload copy.

Recorded source: https://iwant2study.moe.edu.sg/lookangejss/01_measurement/ejss_model_DigitalMicrometer/index.html

## Rebuild in Windows PowerShell

Run from the Digital Micrometer folder:

```powershell
python tutorial/narrate.py
node tutorial/capture.cjs --rehearse
node tutorial/capture.cjs
node tutorial/thumbnail.cjs
python tutorial/render.py
```

Dependencies: installed Node.js Playwright with Chromium, Python `kokoro_onnx`, NumPy and Pillow, local Kokoro assets at `C:/Users/weelo/.codex/skills/kokoro-narration/assets/models`, and FFmpeg/FFprobe on PATH.

The capture opens the live simulation in an iframe and operates its visible controls with pointer, keyboard, and select actions. Model state is read only for assertions and evidence; measurement values are not injected. The simulation fills the 1920 x 1080 frame, with a bright pointer and brief text panels in the empty area above the apparatus. There is no decorative frame. English subtitles are selectable in the MP4 (initially off), with a separate SRT for YouTube. The landscape segment uses a 900 x 510 CSS viewport enlarged in the video; it is not a recording from a physical phone.

`storyboard.json` is the editable narration and scene source. `timeline.json` contains generated narration durations. `capture-log.json` contains actual scene starts and model-state evidence. `media-info.json`, `final-proof/` and `contact-sheet.jpg` document the final encode. Captions use phrase-level timings distributed within each narration segment, not word-level transcription. A color-coded synchronization marker identifies each scene at 25 fps and is removed during rendering. Each video section is mapped to its narration duration so recording lag does not accumulate; `sync-verification.json` records all 21 boundaries and 20 timing corrections. Text files use explicit UTF-8, and teaching labels use ASCII-safe punctuation to prevent mojibake. The previous framed MP4 is preserved in `previous-framed-version/`.

Read the sleeve and thimble scales for the observed reading, then subtract the signed zero error. Final-frame inspection was used to correct the narration; model-state variable names alone were not treated as proof of what the display shows. The iframe triggers Cordova cross-origin detection errors; all demonstrated controls passed behavioral assertions.

One rehearsal did not pass the correct-answer assertion for a whole-number Challenge answer entered as `5.00`. A subsequent non-round answer passed. The final demonstration uses a non-round example; it does not claim to validate every randomized answer format. The simulation itself was not changed for this video task.

No YouTube upload or public publication is performed by these scripts. Use `youtube_upload_prep.md` and `youtube_metadata.json` for the upload. Credits and the simulation's stated CC BY-NC-SA license are retained in the description.
