{"id":"domino-chain","version":"1.0.0","title":"Domino Chain (Real Physics)","summary":"A long line of dominoes topples one after another, simulated with real forces — then the camera pulls back.","kind":"physics","target":"js","collections":["satisfying","bouncing-falling"],"tags":["domino","dominoes","chain reaction","physics","toppling","falling","simulation","satisfying","rigid body","2d","canvas"],"loopable":false,"motion":"simulation","durationSeconds":8,"status":"published","media":{"poster":"https://aipixelwizard.com/media/domino-chain/1.0.0/poster.webp","preview":"https://aipixelwizard.com/media/domino-chain/1.0.0/preview.mp4","sample":"https://aipixelwizard.com/media/domino-chain/1.0.0/sample.mp4","sampleBytes":419946,"sampleNote":"Pre-rendered with the default settings. Customised settings must be exported locally (npm run render)."},"urls":{"page":"https://aipixelwizard.com/visuals/domino-chain","manifest":"https://aipixelwizard.com/api/v1/visuals/domino-chain/versions/1.0.0","agentMd":"https://aipixelwizard.com/registry/domino-chain/1.0.0/agent.md","files":"https://aipixelwizard.com/registry/domino-chain/1.0.0/","demo":"https://aipixelwizard.com/registry/domino-chain/1.0.0/index.html"},"description":"Push the first domino and watch the wave run down the line. Each domino is simulated with gravity and contact forces, so the speed of the wave, the way pieces lean on each other and the final resting angles come from the physics rather than a keyframed animation. Change how many dominoes there are, how far apart they stand, how hard the first one is pushed and the colour gradient along the line.","role":"Motion source: per-frame tilt angles for a row of toppling dominoes.","useCases":["Satisfying chain-reaction clips","Visual metaphor for momentum or a process","Intro that leads into a title"],"synonyms":["chain reaction","domino effect","falling dominoes","toppling blocks","objects fall","satisfying physics","rube goldberg"],"digest":"e992e482d596745a66c7e3f41cec759285d3f187e27aad297f24bec214f7cbf7","implementation":{"target":"js","runtime":"any","language":"javascript","module":"esm","entry":"src/domino-chain.js","exports":[{"name":"simulateDominoChain","signature":"simulateDominoChain({ count?, spacing?, thickness?, gravity?, push?, fps?, durationSeconds?, stepHz? }) => { angleAt(frame, i), pivotX(i), frontAt(frame), count, spacing, thickness, height, frameCount, stats }","description":"Fixed-step simulation baked to per-frame angles."},{"name":"drawDomino","signature":"drawDomino(ctx, sim, frame, i, view, fill?, pip?) => void","description":"Canvas 2D helper to draw one domino at its simulated angle."}],"reusable":["src/domino-chain.js"],"demo":"demo.js","harness":"index.html"},"dependencies":[{"id":"apw-runtime","version":"1.0.0","scope":"demo","reason":"Demo harness and colour helpers. src/domino-chain.js has no dependencies."}],"uses":[],"usedBy":[],"params":[{"key":"count","label":"Dominoes","type":"integer","min":6,"max":60,"step":1,"default":36},{"key":"spacing","label":"Spacing","help":"Distance between dominoes as a fraction of their height. Closer falls faster.","type":"number","min":0.3,"max":0.85,"step":0.01,"default":0.55},{"key":"push","label":"First push","help":"How hard the first domino is flicked. Too soft and it will not tip — that is physics.","type":"number","min":1,"max":3,"step":0.05,"default":1.4},{"key":"gravity","label":"Gravity","help":"9.81 behaves like metre-tall dominoes. Raise it for a quicker, smaller-looking chain.","type":"number","min":3,"max":40,"step":0.1,"default":14},{"key":"pullBack","label":"Pull back at the end","type":"boolean","default":true},{"key":"colorA","label":"First colour","type":"color","default":"#ffd166"},{"key":"colorB","label":"Last colour","type":"color","default":"#ff4d8d"},{"key":"background","label":"Background","type":"color","default":"#101018"}],"presets":[{"id":"default","label":"Sunset chain","params":{}},{"id":"long","label":"Long & fast","params":{"count":60,"spacing":0.4,"gravity":28}},{"id":"slow","label":"Giant & slow","params":{"count":14,"spacing":0.7,"gravity":6,"colorA":"#e8e8f0","colorB":"#8a8fa3"}}],"output":{"width":1080,"height":1080,"fps":30,"durationSeconds":8,"posterSeconds":1.6,"alpha":false,"motion":"simulation","loop":{"seamless":false,"method":"The chain falls once and stays down."},"seed":null},"composition":{"inputs":"Options plus the clip's fps and duration.","outputs":"angleAt(frame, i) in radians (0 upright, π/2 flat) and pivotX(i); frontAt(frame) for a following camera.","coordinates":"Side view. Domino height = 1 unit, floor at y = 0, domino i pivots on its front-bottom edge at x = i × spacing.","lighting":"None (motion only).","timing":"Bake once; frames are random-access lookups.","compatibleWith":["kinetic-title","gradient-background","orbit-camera"],"notes":["For 3D, rotate box meshes about their front-bottom edge by angleAt(frame, i) around the axis perpendicular to the line."]},"reuse":["Build 3D dominoes in Three.js and rotate each about its front-bottom edge by angleAt (works with Orbit Camera).","Let the last domino trigger a Kinetic Title reveal by starting the title at the frame where the last angle exceeds 0.05.","Use frontAt(frame) to drive a progress indicator or camera in any scene."],"integration":{"newProject":"Call simulateDominoChain({ fps, durationSeconds }) once, then each frame draw domino i rotated by angleAt(frame, i) around its pivot at pivotX(i).","existingProject":"Copy src/domino-chain.js. Bake once at scene creation; in your frame loop set each existing domino object's rotation from angleAt. Keep your renderer and art."},"performance":{"notes":"Baking 8 s of 36 dominoes at 4 kHz takes roughly 60–130 ms in Node 22. Playback is a lookup.","limits":"Up to 80 dominoes; straight line only."},"limitations":["One degree of freedom per domino: no sliding, bouncing or tumbling, so impossible-looking setups (very wide spacing) simply stop.","Straight line on a flat floor; no curves, branches or other objects.","Contact is a stiff spring (penalty) model; pieces can overlap by up to about 0.04 units (4% of height) while pressing."],"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":"Original code written for AI Pixel Wizard in October 2026.","changelog":[{"version":"1.0.0","date":"2026-10-02","notes":"Initial release."}],"verification":{"testedOn":"2026-10-02","inputs":{"domino-chain@1.0.0":"e992e482d596745a66c7e3f41cec759285d3f187e27aad297f24bec214f7cbf7","apw-runtime@1.0.0":"5be859cdac74823ba0bcc32c6daf06688a871104d24db5d4ceaffffd84d7c40d"},"environment":"Chrome 151.0.7922.137 headless on Linux 7.0.0-31-generic (x64), Node 22.14.0","renderer":"Canvas 2D","width":1080,"height":1080,"fps":30,"frames":240,"renderSeconds":12.6,"loopCheck":{"checked":false,"seamless":null,"maxDifference":null,"note":"Asset does not claim a seamless loop."},"determinism":{"checked":true,"identical":true},"errors":[],"media":{"poster":"/media/domino-chain/1.0.0/poster.webp","preview":"/media/domino-chain/1.0.0/preview.mp4","sample":"/media/domino-chain/1.0.0/sample.mp4","sampleBytes":419946}},"files":[{"path":"LICENSE","size":1072,"sha256":"8a5f3a96f07e11522ec4bdd0a583356f99bad1245920f9709cee09b995a45153","contentType":"text/plain; charset=utf-8","url":"https://aipixelwizard.com/registry/domino-chain/1.0.0/LICENSE"},{"path":"asset.json","size":7027,"sha256":"f01db95d1773de157eddfad2d363698f5d970ce8174bf405a35c5cdd0caf50b6","contentType":"application/json; charset=utf-8","url":"https://aipixelwizard.com/registry/domino-chain/1.0.0/asset.json"},{"path":"demo.js","size":2511,"sha256":"c1bde888ef91a8fd72c6c8abba4d1e1e6d86f2ce75fe8544b9d6c501dd2dab6a","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/domino-chain/1.0.0/demo.js"},{"path":"index.html","size":541,"sha256":"d919759b383702a59ac236e06ecd4f84fb3f7644e591b3ad85fe719da2074ea8","contentType":"text/html; charset=utf-8","url":"https://aipixelwizard.com/registry/domino-chain/1.0.0/index.html"},{"path":"src/domino-chain.js","size":7689,"sha256":"18e73ba50e12e21fed9354f4fc1b27dae6c84db47c105cb5eb840559c251203f","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/domino-chain/1.0.0/src/domino-chain.js"}],"warnings":[]}