{"id":"ratchet-escapement","version":"1.0.0","title":"Ratchet Escapement","summary":"The escapement of a mechanical watch, enlarged: a ratchet wheel, a rocking anchor with ruby pallets, a swinging balance and a following gear, ticking in sharp steps. Loops perfectly.","kind":"object","target":"three","collections":["satisfying","hypnotic-loops","product-reveals"],"tags":["escapement","ratchet","watch movement","anchor","balance wheel","ticking","clockwork","brass","jewels","studio","loop","3d"],"loopable":true,"motion":"procedural","durationSeconds":16,"status":"published","media":{"poster":"https://aipixelwizard.com/media/ratchet-escapement/1.0.0/poster.webp","preview":"https://aipixelwizard.com/media/ratchet-escapement/1.0.0/preview.mp4","sample":"https://aipixelwizard.com/media/ratchet-escapement/1.0.0/sample.mp4","sampleBytes":2747274,"sampleNote":"Pre-rendered with the default settings. Customised settings must be exported locally (npm run render)."},"urls":{"page":"https://aipixelwizard.com/visuals/ratchet-escapement","manifest":"https://aipixelwizard.com/api/v1/visuals/ratchet-escapement/versions/1.0.0","agentMd":"https://aipixelwizard.com/registry/ratchet-escapement/1.0.0/agent.md","files":"https://aipixelwizard.com/registry/ratchet-escapement/1.0.0/","demo":"https://aipixelwizard.com/registry/ratchet-escapement/1.0.0/index.html"},"description":"The heart of a mechanical watch, enlarged and laid bare. A sixteen-toothed escape wheel is held by the two jewelled pallets of an anchor; the anchor rocks to and fro, letting one tooth escape at every tick, and the wheel advances in a sharp little step each time. A balance wheel with a hairspring swings steadily above it, setting the pace, and a larger gear turned by the wheel follows at half its speed. Choose the metal (brass, steel, rose or blue steel), the whole turns of the escape wheel per loop, whether a dark bridge plate sits behind, the backdrop colour and whether the camera sways.","role":"Object (3D, three.js): a precise, hypnotic mechanical showpiece for watch, engineering and time-themed content.","useCases":["A watch, clock or luxury timepiece scene","A time, precision or engineering explainer","A hypnotic ticking loop"],"synonyms":["watch escapement","anchor escapement","escape wheel","clock mechanism","ticking mechanism","horology"],"digest":"b3b78447dcf7e48e4777eccb2ccc3c1b816601c746bf1787d69914dc9820c86c","implementation":{"target":"three","runtime":"browser","language":"javascript","module":"esm","entry":"src/ratchet-escapement.js","exports":[{"name":"createEscapement","signature":"createEscapement({ metal?, turns?, plate? }) => { group, ticks, setProgress(progress), dispose() }","description":"The escape wheel, anchor, balance wheel with hairspring and follower gear, about 9 across, in the xy plane facing +z; `ticks` is the number of ticks per loop; needs an environment map."},{"name":"METALS","signature":"METALS: { brass, steel, rose, blue }","description":"Metal finishes with colour and roughness."}],"reusable":["src/ratchet-escapement.js"],"demo":"demo.js","harness":"index.html"},"dependencies":[{"id":"three","version":"0.185.1","scope":"source","reason":"Renderer, geometry and shader materials."},{"id":"chrome-material","version":"1.1.0","scope":"demo","reason":"Studio environment light, backdrop and contact shadow."},{"id":"apw-runtime","version":"1.0.0","scope":"demo","reason":"Demo harness."}],"uses":[],"usedBy":[],"params":[{"key":"metal","label":"Metal","type":"select","default":"brass","options":[{"value":"brass","label":"Brass"},{"value":"steel","label":"Steel"},{"value":"rose","label":"Rose gold"},{"value":"blue","label":"Blue steel"}]},{"key":"turns","label":"Wheel turns per loop","help":"Whole turns of the escape wheel per loop, sixteen ticks each.","type":"integer","min":1,"max":3,"step":1,"default":1},{"key":"plate","label":"Bridge plate","type":"boolean","default":true},{"key":"background","label":"Backdrop","type":"color","default":"#1a1612"},{"key":"orbit","label":"Camera sway","type":"boolean","default":true}],"presets":[{"id":"default","label":"Brass, one turn","params":{}},{"id":"steel","label":"Steel, three turns","params":{"metal":"steel","turns":3,"background":"#12161c"}},{"id":"rose","label":"Rose gold, no plate","params":{"metal":"rose","plate":false,"background":"#1c1216"}},{"id":"blue","label":"Blue steel","params":{"metal":"blue","turns":2,"background":"#10141c"}}],"output":{"width":1080,"height":1080,"fps":30,"durationSeconds":16,"posterSeconds":3,"alpha":false,"motion":"procedural","loop":{"seamless":true,"cycleSeconds":16,"method":"The wheel advances a whole number of teeth per loop (sixteen ticks per turn, an even number so the anchor is back where it started), the balance swings in a sine of the ticks and the camera sway is a sine of the loop, so the last frame meets the first."},"seed":null},"composition":{"inputs":"Time within the loop; the metal, turns, plate, backdrop and camera sway.","outputs":"A full frame rendered in 3D with a studio environment.","coordinates":"The escape wheel (radius 2.05) is at the origin of the group; the anchor pivots 3.5 above it and the balance wheel sits 6 above it; the follower gear is 4.75 to the right.","lighting":"A warm key light with a shadow map and the studio environment on the metal.","timing":"setProgress(progress) sets every part's angle in closed form from the tick count; frames render in any order.","compatibleWith":["chrome-material","orbit-camera","kinetic-title","number-reveal"],"notes":["The wheel waits then steps in the second half of every tick; the anchor flips between its stops."]},"reuse":["Watch brand: Brass, one turn.","Cool engineering: Steel, three turns.","Luxury: Rose gold, no plate."],"integration":{"newProject":"Create a WebGLRenderer with a studio environment and a shadow-casting light, add createEscapement().group and call mech.setProgress(progress) each frame.","existingProject":"Copy src/ratchet-escapement.js; add the group to your scene with an environment map."},"performance":{"notes":"A few thousand triangles and a shadow map: about a millisecond a frame on an integrated Intel GPU.","limits":"Software WebGL renders in about a second a frame."},"limitations":["The pallets do not truly lock against the teeth: the motion is timed by formula, not simulated.","The follower gear's teeth only roughly mesh with the escape wheel."],"license":{"spdx":"MIT","notice":"Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder.","thirdParty":[]},"rights":{"approvedForPublicRelease":true},"provenance":"Adapted from the owner's threejs-sketches/objects-scenes/ratchet-escapement (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original studio object: an extruded sawtooth escape wheel, a ruby-pallet anchor, a balance wheel with hairspring and a follower gear, all timed from a whole tick count on an exact loop.","changelog":[{"version":"1.0.0","date":"2026-10-05","notes":"Initial release."}],"verification":{"testedOn":"2026-10-06","inputs":{"ratchet-escapement@1.0.0":"b3b78447dcf7e48e4777eccb2ccc3c1b816601c746bf1787d69914dc9820c86c","three@0.185.1":"664ca387e5fab46ff2daaa6895e1d015426850891af5ea5082cbbcc3985b068c","chrome-material@1.1.0":"ecb41776bfc1ee88997604f916a5ffe833f971d7edcc97c855697a5792d6f1dd","apw-runtime@1.0.0":"5be859cdac74823ba0bcc32c6daf06688a871104d24db5d4ceaffffd84d7c40d"},"environment":"Chrome 154.0.8037.97 headless on Linux 7.0.0-38-generic (x64), Node 22.14.0","renderer":"WebGL 2 via SwiftShader (software)","width":1080,"height":1080,"fps":30,"frames":480,"renderSeconds":1427,"loopCheck":{"checked":true,"seamless":true,"maxDifference":0,"note":"Frame 0 vs end state (progress 1): mean |Δ| 0.0000, max |Δ| 0 of 255."},"determinism":{"checked":true,"identical":true},"errors":[],"media":{"poster":"/media/ratchet-escapement/1.0.0/poster.webp","preview":"/media/ratchet-escapement/1.0.0/preview.mp4","sample":"/media/ratchet-escapement/1.0.0/sample.mp4","sampleBytes":2747274}},"files":[{"path":"LICENSE","size":1072,"sha256":"8a5f3a96f07e11522ec4bdd0a583356f99bad1245920f9709cee09b995a45153","contentType":"text/plain; charset=utf-8","url":"https://aipixelwizard.com/registry/ratchet-escapement/1.0.0/LICENSE"},{"path":"asset.json","size":7573,"sha256":"be558b7dadb67102b5b2c0032588ecfc346a962093c6c8788d0cff8ed6553cf1","contentType":"application/json; charset=utf-8","url":"https://aipixelwizard.com/registry/ratchet-escapement/1.0.0/asset.json"},{"path":"demo.js","size":2225,"sha256":"60475285199de5c200e48baa8b8e93f62d734ff6b984932a2732c3e2c765163f","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/ratchet-escapement/1.0.0/demo.js"},{"path":"index.html","size":532,"sha256":"ae9f5889f2f473ebd1cd68fe67e9191ec4c13cc1b34755fbbaefa9c0d53a2838","contentType":"text/html; charset=utf-8","url":"https://aipixelwizard.com/registry/ratchet-escapement/1.0.0/index.html"},{"path":"src/ratchet-escapement.js","size":8937,"sha256":"55ca2155ba1a5da0f5d8122cb6aa1a258b8bc25ae651e2ca44f93b6c22820d2e","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/ratchet-escapement/1.0.0/src/ratchet-escapement.js"}],"warnings":[]}