{"id":"stained-butterfly","version":"1.0.0","title":"Cathedral of a Butterfly","summary":"A bronze cocoon unfolds into a jewel-coloured stained-glass butterfly; the panes become a cathedral rose window casting coloured light across the stone floor. Loops.","kind":"background","target":"three","collections":["impossible-worlds","chrome-glass","hypnotic-loops"],"tags":["stained glass","butterfly","cathedral","rose window","church","jewel","colourful","light","cocoon","window","gothic","nature","insect","loop","portrait film"],"loopable":true,"motion":"procedural","durationSeconds":8,"status":"published","media":{"poster":"https://aipixelwizard.com/media/stained-butterfly/1.0.0/poster.webp","preview":"https://aipixelwizard.com/media/stained-butterfly/1.0.0/preview.mp4","sample":"https://aipixelwizard.com/media/stained-butterfly/1.0.0/sample.mp4","sampleBytes":1012088,"sampleNote":"Pre-rendered with the default settings. Customised settings must be exported locally (npm run render)."},"urls":{"page":"https://aipixelwizard.com/visuals/stained-butterfly","manifest":"https://aipixelwizard.com/api/v1/visuals/stained-butterfly/versions/1.0.0","agentMd":"https://aipixelwizard.com/registry/stained-butterfly/1.0.0/agent.md","files":"https://aipixelwizard.com/registry/stained-butterfly/1.0.0/","demo":"https://aipixelwizard.com/registry/stained-butterfly/1.0.0/index.html"},"description":"In a carved stone arch a bronze cocoon unfolds into a stained-glass butterfly with dark raised lead lines and eight jewel colours in mottled, mouth-blown panes. The wings spread, then the same panes rearrange into a round rose window, and coloured light from the glass is projected onto the stone floor below. It folds back into the cocoon, so the 8 seconds loop. The film has no settings.","role":"Shader film (three.js): Stained glass, a finished 8-second portrait film with no settings.","useCases":["A spring, Easter or transformation-themed video","A wedding, church or heritage-building promo","A looping colourful background for a title"],"synonyms":["stained glass butterfly","rose window animation","cathedral window","colourful glass","butterfly metamorphosis","church window light"],"digest":"6a9c9988d966f1fe2d02648217edbe3508308f72981eaffcb4a92ed0d1cb325f","implementation":{"target":"three","runtime":"browser","language":"javascript","module":"esm","entry":"src/stained-butterfly.js","exports":[{"name":"createStainedButterfly","signature":"createStainedButterfly() => { scene, camera, setSize(width, height), update(time), dispose() }","description":"The film as one full-screen shader; render its scene with its camera straight to the canvas."}],"reusable":["src/stained-butterfly.js"],"demo":"demo.js","harness":"index.html"},"dependencies":[{"id":"three","version":"0.185.1","scope":"source","reason":"Renderer and a full-screen shader material."},{"id":"apw-runtime","version":"1.0.0","scope":"demo","reason":"Demo harness."}],"uses":[],"usedBy":[],"params":[],"presets":[],"output":{"width":1080,"height":1350,"fps":30,"durationSeconds":8,"posterSeconds":5.5,"alpha":false,"motion":"procedural","loop":{"seamless":true,"cycleSeconds":8,"method":"Every part of the film is a function of the time modulo its length, and every motion completes whole cycles, so the last frame meets the first."},"seed":null},"composition":{"inputs":"The time in seconds, 0 to 8. The film has no other settings.","outputs":"An opaque full-frame picture, already in display colours: render it straight to the canvas.","coordinates":"Composed for a 4:5 portrait frame and measured by the frame height: in a wider frame the picture stays centred at full height and its background fills the sides; in a narrower one, such as 9:16, the sides are cropped.","lighting":"Light passes through the glass: the panes glow from behind and project coloured light onto the stone floor.","timing":"The cocoon unfolds into a butterfly, the panes become a rose window, then everything folds back into the cocoon.","compatibleWith":[],"notes":["Eight jewel colours, with each pane mottled differently.","Dark raised lead lines and a carved stone arch frame the glass.","Every pixel is a function of the time alone, so frames can be rendered in any order."]},"reuse":["Transformation story: cocoon, butterfly, rose window in one 8-second shot.","Seamless loop: it folds back to the cocoon, so it repeats for any length.","Spring greeting: the open butterfly holds for a second or two, which suits a short message."],"integration":{"newProject":"Create a WebGLRenderer on a canvas (no antialiasing), call createStainedButterfly() once and film.setSize(width, height); then for each frame call film.update(timeInSeconds) and renderer.render(film.scene, film.camera).","existingProject":"Copy src/stained-butterfly.js, which needs only three. Render film.scene with film.camera into your own canvas or render target; the output is opaque and already in display colours, so use no tone mapping or colour conversion."},"performance":{"notes":"One full-screen fragment shader. About 4 ms a frame at 1080 by 1350 on an integrated Intel GPU (Iris Xe), and about 1 s a frame with software WebGL.","limits":"Plays at 30 frames a second at full size on an integrated GPU."},"limitations":["The film is finished: it has no settings. To change colours or timing, edit the shader.","It is composed for a 4:5 portrait frame.","Its length is fixed at 8 seconds; repeat the loop to fill a longer clip."],"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":"From the owner's collection Twenty Impossible Worlds: the original GLSL ES 3.00 shader of the film “Cathedral of a Butterfly”, created with ChatGPT / Codex and used as published, wrapped for AI Pixel Wizard as a three.js full-screen shader in October 2026. The collection's synthesised soundtrack is not part of this ingredient.","changelog":[{"version":"1.0.0","date":"2026-10-10","notes":"Initial release."}],"verification":{"testedOn":"2026-10-10","inputs":{"stained-butterfly@1.0.0":"6a9c9988d966f1fe2d02648217edbe3508308f72981eaffcb4a92ed0d1cb325f","three@0.185.1":"664ca387e5fab46ff2daaa6895e1d015426850891af5ea5082cbbcc3985b068c","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":1350,"fps":30,"frames":240,"renderSeconds":415.3,"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/stained-butterfly/1.0.0/poster.webp","preview":"/media/stained-butterfly/1.0.0/preview.mp4","sample":"/media/stained-butterfly/1.0.0/sample.mp4","sampleBytes":1012088}},"files":[{"path":"LICENSE","size":1072,"sha256":"8a5f3a96f07e11522ec4bdd0a583356f99bad1245920f9709cee09b995a45153","contentType":"text/plain; charset=utf-8","url":"https://aipixelwizard.com/registry/stained-butterfly/1.0.0/LICENSE"},{"path":"asset.json","size":5878,"sha256":"23ebcdb19652a5e26d3a767175136754759817340570036bf2e0f8e944615680","contentType":"application/json; charset=utf-8","url":"https://aipixelwizard.com/registry/stained-butterfly/1.0.0/asset.json"},{"path":"demo.js","size":696,"sha256":"3980f419135397ae786300ef3d75e2dc1b4700d136c6626a44bcc5d41f65542d","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/stained-butterfly/1.0.0/demo.js"},{"path":"index.html","size":538,"sha256":"378c50a440c5d311a3e65c3d9ce026cc2deefaef97bf4f0ce1953188d68e2f58","contentType":"text/html; charset=utf-8","url":"https://aipixelwizard.com/registry/stained-butterfly/1.0.0/index.html"},{"path":"src/stained-butterfly.js","size":8278,"sha256":"6b2e36553f5201d1f4dfcc8ccf675b477b1426c5c8381734cb910f11461f6abe","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/stained-butterfly/1.0.0/src/stained-butterfly.js"}],"warnings":[]}