Skills

Teardown

Build an interactive 3D simulator of a real machine or mechanism (an engine, a landing...

Install

npx skills add elvarofficial/teardown --skill teardown -g -a claude-code -y
Category
Media
Updated
4d ago
License
MIT
Context cost
Mediumabout 2,746 tokens
Runs scripts
No, instructions only

What it does

Build an interactive 3D simulator of a real machine or mechanism (an engine, a landing gear, a walking linkage, a pump, a gearbox) as one offline HTML page people can take apart, with live panels driven by the same model that moves the parts, a button for every subsystem, cutaways, camera views and an auto tour that hands control to the visitor; then record it frame by frame to a 60 fps video with a synced procedural score. Use when someone asks how a machine works, wants a "visual explainer", a "simulator", a "cutaway", an "exploded view" or an "interactive 3D lesson", or wants a 3D object shown working rather than described.

Teardown

One machine, one page. The visitor sees the thing run, presses a button, and the part doing the work opens up while the gauges around it read the real numbers. Left alone, the page tours itself with a cursor. The same code records a film of the tour, frame by frame, with a score built on the same timeline.

SKILL_DIR below is the folder this file lives in. Builds and renders go to ./teardown-out of the folder you run from.

First run

cd "$SKILL_DIR" && npm install && npx playwright install chromium

The pages need nothing else. The video needs ffmpeg on PATH and the score needs Python 3 (standard library only). Set FFMPEG, PYTHON or CHROMIUM to point at other binaries.

The 3 examples

Build one, open the HTML, press buttons. Copy the closest one when you start a new machine.

The machineWhat drives itWorth stealing
v8-*A cross-plane V8 with glass liners: the charge burns inside the cylinder you track, valves lift on their cams, 8 pistons move from the exact slider-crank.Crank angle. Firing order 1-8-4-3-6-5-7-2, a chamber pressure model for the indicator diagram.Cutaway modes (glass, section, solid), the firing order as a cylinder picker, live charts synced to the crank.
cessna-*The Cessna 337 main landing gear folding into the airframe on takeoff and dropping on landing.Stroke 0..1: a 201 mm rack turns a 32-tooth pinion (module 4 mm) through exactly 180°.One degree of freedom posing a whole mechanism, flight phases as functions of time, a runway that rolls under the model.
strandbeest-*Theo Jansen's Strandbeest, 20 legs on one crankshaft, walking broadside over sand.Wind. The crank speed is integrated from it; every joint follows by circle intersection from Jansen's 11 link lengths.An exact linkage solver in 67 lines, instanced tubes, foot traces, a contact chart of all 20 feet.
Read the whole SKILL.md on GitHub

More in Media