{"id":"spinning-top","version":"1.0.0","title":"Spinning Top","summary":"A painted tin top whirring on a polished floor, leaning, precessing and wandering in a small circle. Loops perfectly.","kind":"object","target":"three","collections":["satisfying","hypnotic-loops","product-reveals"],"tags":["spinning top","gyroscope","precession","toy","spiral","tin toy","nostalgia","hypnotic","loop","3d"],"loopable":true,"motion":"procedural","durationSeconds":12,"status":"published","media":{"poster":"https://aipixelwizard.com/media/spinning-top/1.0.0/poster.webp","preview":"https://aipixelwizard.com/media/spinning-top/1.0.0/preview.mp4","sample":"https://aipixelwizard.com/media/spinning-top/1.0.0/sample.mp4","sampleBytes":1753226,"sampleNote":"Pre-rendered with the default settings. Customised settings must be exported locally (npm run render)."},"urls":{"page":"https://aipixelwizard.com/visuals/spinning-top","manifest":"https://aipixelwizard.com/api/v1/visuals/spinning-top/versions/1.0.0","agentMd":"https://aipixelwizard.com/registry/spinning-top/1.0.0/agent.md","files":"https://aipixelwizard.com/registry/spinning-top/1.0.0/","demo":"https://aipixelwizard.com/registry/spinning-top/1.0.0/index.html"},"description":"A painted tin top spinning on its steel tip on a polished floor: its coloured spiral flickers as it turns, it leans and precesses in a slow circle, wobbles with the nutation of a real gyroscope and wanders in a small orbit across the floor, a bright reflection of it below. Choose the paint (carnival, jade, mono or sunset), how fast it spins, how far it leans, how far it wanders, the backdrop and whether the camera drifts.","role":"Object (3D, three.js): a playful, hypnotic hero object for toys, nostalgia, physics and focus content.","useCases":["A toy, nostalgia or family-brand title scene","A physics (gyroscopes, angular momentum) explainer","A hypnotic focus loop"],"synonyms":["top toy","whirligig","spinning toy","gyro top","tin top","precessing top"],"digest":"5ddd85fb2711d8194b0f187b159df658c5b7cacc6940c777de17258fd097213f","implementation":{"target":"three","runtime":"browser","language":"javascript","module":"esm","entry":"src/spinning-top.js","exports":[{"name":"createSpinningTop","signature":"createSpinningTop({ finish?, spin?, lean?, wander? }) => { group, setProgress(progress), dispose() }","description":"The top (2.4 tall) as a group standing on its tip on y = 0; add it with an environment map and a shadow-casting light."},{"name":"FINISHES","signature":"FINISHES: { carnival, jade, mono, sunset }","description":"Paint colours."}],"reusable":["src/spinning-top.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":"finish","label":"Paint","type":"select","default":"carnival","options":[{"value":"carnival","label":"Carnival"},{"value":"jade","label":"Jade and gold"},{"value":"mono","label":"Black and white"},{"value":"sunset","label":"Sunset"}]},{"key":"spin","label":"Spin","help":"Whole turns about its own axis per loop.","type":"integer","min":8,"max":80,"step":1,"default":36},{"key":"lean","label":"Lean","type":"number","min":0.4,"max":1.8,"step":0.05,"default":1},{"key":"wander","label":"Wander","type":"number","min":0,"max":2,"step":0.05,"default":1},{"key":"background","label":"Backdrop","type":"color","default":"#1c2a3a"},{"key":"orbit","label":"Camera drift","type":"boolean","default":true}],"presets":[{"id":"default","label":"Carnival top","params":{}},{"id":"jade","label":"Jade and gold, slow","params":{"finish":"jade","spin":16,"background":"#14241e"}},{"id":"mono","label":"Black and white blur","params":{"finish":"mono","spin":60,"background":"#1a1a1e"}},{"id":"still","label":"Sunset, upright","params":{"finish":"sunset","lean":0.4,"wander":0,"background":"#2a1a22"}}],"output":{"width":1080,"height":1080,"fps":30,"durationSeconds":12,"posterSeconds":2,"alpha":false,"motion":"procedural","loop":{"seamless":true,"cycleSeconds":12,"method":"The top spins a whole number of turns, precesses twice, wobbles eleven times and wanders once round its small circle per loop, and the camera drift is a sine of the loop, so the last frame meets the first."},"seed":null},"composition":{"inputs":"Time within the loop; the paint, spin, lean, wander, backdrop and camera drift.","outputs":"A full frame rendered in 3D with soft shadows and a glossy floor.","coordinates":"The tip stands on y = 0 and wanders on an ellipse of radius up to 0.9; the top is 2.4 tall.","lighting":"A warm key light with a shadow map and the studio environment on the clear-coated paint, steel and polished floor.","timing":"setProgress(progress) sets the spin, lean and position; frames render in any order.","compatibleWith":["chrome-material","orbit-camera","kinetic-title","number-reveal"],"notes":["The lean's axis rotates twice per loop (precession) while its angle varies by ±15 % eleven times a loop (nutation); the spiral is drawn once on a canvas."]},"reuse":["Toy brand title: Carnival top.","Physics explainer: Jade and gold, slow.","Hypnotic loop: Black and white blur."],"integration":{"newProject":"Create a WebGLRenderer with shadows and a studio environment (see chrome-material), add createSpinningTop().group and call top.setProgress(progress) each frame.","existingProject":"Copy src/spinning-top.js; add top.group to your scene with an environment map and a shadow-casting light."},"performance":{"notes":"About eight meshes and one shadow map. A couple of milliseconds a frame on an integrated Intel GPU.","limits":"Software WebGL renders in about a second a frame."},"limitations":["The motion is a prescribed gyroscope-like formula, not rigid-body dynamics: it never slows or falls.","At high spin counts the spiral strobes at 30 frames a second."],"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/physics-simulation/spinning-top (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original object: lathe-turned painted tin with a canvas spiral, precession and nutation as whole-cycle sines, a wandering tip on a glossy floor and an exact loop.","changelog":[{"version":"1.0.0","date":"2026-10-05","notes":"Initial release."}],"verification":{"testedOn":"2026-10-06","inputs":{"spinning-top@1.0.0":"5ddd85fb2711d8194b0f187b159df658c5b7cacc6940c777de17258fd097213f","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":360,"renderSeconds":719.2,"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/spinning-top/1.0.0/poster.webp","preview":"/media/spinning-top/1.0.0/preview.mp4","sample":"/media/spinning-top/1.0.0/sample.mp4","sampleBytes":1753226}},"files":[{"path":"LICENSE","size":1072,"sha256":"8a5f3a96f07e11522ec4bdd0a583356f99bad1245920f9709cee09b995a45153","contentType":"text/plain; charset=utf-8","url":"https://aipixelwizard.com/registry/spinning-top/1.0.0/LICENSE"},{"path":"asset.json","size":7357,"sha256":"80bff4b7b94476644fe470ccab160af147832daede758bf2171997f3f62b9e10","contentType":"application/json; charset=utf-8","url":"https://aipixelwizard.com/registry/spinning-top/1.0.0/asset.json"},{"path":"demo.js","size":2848,"sha256":"1925f693d41006bc2d99c7dd4bfe787a3a896efb58630e4994652324e63a41ce","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/spinning-top/1.0.0/demo.js"},{"path":"index.html","size":526,"sha256":"1863db1fdd404a756c1ea3029cc347455316b3c8121ec6d743eac3635f2c962f","contentType":"text/html; charset=utf-8","url":"https://aipixelwizard.com/registry/spinning-top/1.0.0/index.html"},{"path":"src/spinning-top.js","size":5062,"sha256":"15afab7e19c717353c0cce63608d2d54ca1b3513a6c4265cc323ea981b9707c1","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/spinning-top/1.0.0/src/spinning-top.js"}],"warnings":[]}