motion-replica

Installation
SKILL.md

Motion Replica

This skill reproduces an existing motion piece shot for shot, in code. There's no After Effects involved. One HTML page draws frame t. Layout and UI are DOM, and 3D props are three.js on transparent canvases stacked between DOM layers. A Playwright script steps t frame by frame and pipes screenshots to ffmpeg. The quality comes from measuring before building, then comparing against the reference at the same timestamps after every pass.

the worked example, rebuilt

path what it is
scripts/study.py Measures the reference: size, fps and duration. Finds each cell's loop period and scene cuts, writes contact sheets, and makes --burst 20 fps strips for reading curves.
scripts/render.py The page → MP4 renderer, or stills (--stills). Runs on the real GPU and muxes in audio. --probe checks WebGL.
scripts/compare.py stills: reference | replica at the same timestamps. motion: per-cell sheets with the reference row over the replica row.
scripts/prep-glb.sh Shrinks a GLB (meshopt + webp), keeps material names and embeds it as base64 JS.
scripts/font2typeface.py TTF (variable OK) → three.js typeface for extruded 3D type.
templates/replica/ Scaffold: lib/replica.js (timeline core, easing, odometer, rays, icons, boot), lib/replica.css, assets/assets3d.js (3D kit), a demo index.html and lookdev.html.
examples/cero-grid/ A complete 2×2 ad rebuilt this way: phone UIs, number rolls, a sunburst prize burst, 3D pack, car, coins and digits. Run ./fetch-assets.sh once to get the car.

Setup

Installs
2
GitHub Stars
8
First Seen
Nov 11, 2026