Playbook and Three.js code kit for detailed dioramas: classic pixel art, stroked toon or pixel + stroke; two intake gates for look and model sourcing; free orbit, palette snap and ink; animated toy-scale cast; per-entity frame QA.
Reference scope
Load only when routed by SKILL.md. The core profile, scale, construction-first and evidence rules take precedence over legacy calibration counts, numerical examples or workflow order here. Subject-specific examples are recipes, not universal requirements. Paths beginning templates/, verify/ or media/ are relative to the skill root.
Repair acceptance: enclosure, fit and reference UI (3.15)
Use this short checklist for existing educational scenes before re-reading narrative recipes. Evidence: the LEAP-1B repair was requested because its permanent section exposed the core, its fit cropped the model, its beige background and crowded panel did not match the requested V8 reference. These checks supplement mechanical QA; passing enclosure rays or a screenshot does not certify a complete mechanism.
- Closed first, explicit Inside. Unless a permanent section is commissioned, cold load and hero Reset show the complete opaque housing, no tutorial tint, Inside off. Build the missing casing as real connected wall geometry while preserving inlet/outlet openings; a toggle cannot repair absent geometry. Inside is a named semantic button in the single surface. Internal picker or lesson selection may explicitly activate it, but must update its pressed state; leaving the lesson restores the preceding Inside state. Clearing selection preserves an independently enabled Inside state. Test: load → Inside on/off → internal selection → clear → lesson exit → Reset; check visible ancestors, nearest opaque ray hits, exact material restoration and open-mouth rays.
- Fit the assembly in the space actually available. Measure canvas layout
after the dock/panel; use actual complete assembly bounds including covers,
supports and swept extrema, not a default slab. Fit the safe rectangle with
padding; if UI overlays the canvas, solve its offset as well as distance.
With direction target→camera, depth is
distance - along, so each fit bound contributesabs(transverse)/tanHalf + along(not minus along). Do not clamp distance below the solved fit or distort portrait aspect. Re-measure on layout, disclosure, resize/orientation and zoom changes without hijacking user orbit. Test: project covered/exposed swept bounds at desktop, tablet, 390×844, 320×640 and 200% zoom, with lesson/disclosure open; front/back/high captures; fail an injected protrusion and verify near-plane/focus fits separately. - UI repair: compare the supplied reference before changing placement;
apply
Canonical educational UI and inspection contract, including rendered background, accessible lesson state and desktop/phone/200% zoom gates. Do not copy the reference subject or introduce a second surface.