lab-explainer
Lab explainer
A film is a studio set: a dark room, a console with a steep control panel, and on it an apparatus the viewer learns from. A title card at the top left carries live stats and one sentence that is rewritten from the numbers every frame. A control panel at the top right shows buttons being pressed and sliders moving. Part labels float on the model. The film cuts between four or five camera setups while the controls change, and the scene answers each change the way the real equation says it should.
The formula decides everything the viewer reads. The one file you write, film.js, holds the parameters, a derive() function that turns them into every derived number, the timeline of control changes, the UI, and a build(kit) function that makes the set and poses it from those numbers each frame. derive() is plain JavaScript, so scripts/check.mjs can print the whole film's numbers and sentences in Node before a single frame is rendered.
Run every command from this skill's directory.
Setup
node scripts/setup.mjs
Installs three and playwright-core here, finds or downloads Chromium, checks ffmpeg, then checks and renders a frame of an example. Rendering uses the GPU (--use-angle=metal on macOS).
Workflow
1. Pin down the model and the moment. Write down the parameters the viewer controls, the numbers the film shows, and the one thing the formula does that people don't expect: a threshold (total internal reflection), a crossover, a limit, a non-linearity (sharp zone growing with distance squared). The story is built around that moment. If there is a reference video with numbers on screen, fit the model to them before anything else. The plane-of-focus reference's "1.5 cm at 54 cm, 3.9 cm at 86 cm, 12 cm at f/16" pinned it to a 50 mm lens with a 0.035 mm circle of confusion.