{"id":"sky-lanterns","version":"1.0.0","title":"Sky Lanterns","summary":"Paper lanterns released from beyond a dark shore rise through a starry sky, their glow trembling in a still lake. Loops perfectly.","kind":"background","target":"three","collections":["satisfying","backgrounds","hypnotic-loops"],"tags":["lanterns","sky lanterns","paper lanterns","festival","night","stars","moon","lake","reflection","yi peng","loi krathong","celebration","loop","background"],"loopable":true,"motion":"procedural","durationSeconds":16,"status":"published","media":{"poster":"https://aipixelwizard.com/media/sky-lanterns/1.0.0/poster.webp","preview":"https://aipixelwizard.com/media/sky-lanterns/1.0.0/preview.mp4","sample":"https://aipixelwizard.com/media/sky-lanterns/1.0.0/sample.mp4","sampleBytes":2940162,"sampleNote":"Pre-rendered with the default settings. Customised settings must be exported locally (npm run render)."},"urls":{"page":"https://aipixelwizard.com/visuals/sky-lanterns","manifest":"https://aipixelwizard.com/api/v1/visuals/sky-lanterns/versions/1.0.0","agentMd":"https://aipixelwizard.com/registry/sky-lanterns/1.0.0/agent.md","files":"https://aipixelwizard.com/registry/sky-lanterns/1.0.0/","demo":"https://aipixelwizard.com/registry/sky-lanterns/1.0.0/index.html"},"description":"A festival night in the manner of Yi Peng and Loi Krathong: dozens of paper lanterns, each with its bamboo ribs and the flame at its open mouth, rise one after another from behind a dark shore, sway, drift on the wind and burn out high in the sky; far ones are small and dim, near ones large and bright. Above them stars twinkle and a low moon hangs; below, a still lake holds the lanterns' reflections as trembling streaks, with the lights of a far village along the shore. Choose the mood (warm gold, festival colours, rose or silver), how many lanterns fill the sky, the wind and sway, their glow, the moon, the stars and how much the lake ripples.","role":"Background (WebGL, full frame): a warm, hopeful night scene for titles, music, celebration and wellbeing content.","useCases":["A hopeful backdrop for music, lyric videos and wellbeing content","A festival, wedding or memorial title scene","A travel, culture or fantasy story opener"],"synonyms":["floating lanterns","lantern festival","chinese lanterns","wish lanterns","kongming lanterns","rising lanterns","night festival","lantern release"],"digest":"817883301e9c4c762193b7819062cb8cf024fe0c0dc5e1ce2bcd4408dbb6f82d","implementation":{"target":"three","runtime":"browser","language":"javascript","module":"esm","entry":"src/sky-lanterns.js","exports":[{"name":"createSkyLanterns","signature":"createSkyLanterns({ palette?, count?, wind?, sway?, glow?, moon?, stars?, water?, seed? }) => { scene, camera, plan, setSize(width, height), update(time, loopSeconds), dispose() }","description":"The sky, the lanterns (instanced quads painted by a shader) and the shore and lake: render its scene with its camera after setSize and update, ideally through createBloomPass."},{"name":"createBloomPass","signature":"createBloomPass(renderer, { width, height, glow?, exposure?, grain? }) => { render(scene, camera, output?), dispose() }","description":"A small bloom with filmic tone mapping: draws a scene to the canvas with its glow."},{"name":"planLanterns","signature":"planLanterns({ count?, seed? }) => lantern[]","description":"The constants of every lantern: depth, release time, size, how high it climbs, its sway."},{"name":"lanternAt","signature":"lanternAt(lantern, loopPhase, aspect?, wind?, sway?) => { x, y, hs, alive, tilt, flicker }","description":"Where a lantern is at a point of the loop: a pure function of the phase."},{"name":"PALETTES","signature":"PALETTES: { warm, festival, rose, silver }","description":"Lantern, sky and water colours (sRGB hex) for each mood."}],"reusable":["src/sky-lanterns.js"],"demo":"demo.js","harness":"index.html"},"dependencies":[{"id":"three","version":"0.185.1","scope":"source","reason":"Renderer, the sky, lantern and lake shaders and the bloom targets."},{"id":"apw-runtime","version":"1.0.0","scope":"demo","reason":"Demo harness."}],"uses":[],"usedBy":[],"params":[{"key":"palette","label":"Mood","type":"select","default":"warm","options":[{"value":"warm","label":"Warm gold"},{"value":"festival","label":"Festival colours"},{"value":"rose","label":"Rose"},{"value":"silver","label":"Silver moonlight"}]},{"key":"count","label":"Lanterns","help":"How many lanterns are in flight at once.","type":"integer","min":10,"max":120,"step":5,"default":70},{"key":"wind","label":"Wind","help":"How far the lanterns drift sideways as they rise.","type":"number","min":0,"max":2,"step":0.05,"default":1},{"key":"sway","label":"Sway","help":"How much each lantern sways and tilts.","type":"number","min":0,"max":2,"step":0.05,"default":1},{"key":"glow","label":"Glow","type":"number","min":0.4,"max":1.8,"step":0.05,"default":1},{"key":"moon","label":"Moon","help":"The size of the moon; 0 takes it away.","type":"number","min":0,"max":1.6,"step":0.05,"default":1},{"key":"stars","label":"Stars","type":"number","min":0,"max":1.6,"step":0.05,"default":1},{"key":"water","label":"Lake","help":"How much the lake ripples and reflects.","type":"number","min":0,"max":1.5,"step":0.05,"default":1},{"key":"seed","label":"Seed","type":"integer","min":1,"max":999,"step":1,"default":9}],"presets":[{"id":"default","label":"Warm gold, moonlit lake","params":{}},{"id":"festival","label":"Festival colours, a crowded sky","params":{"palette":"festival","count":110,"wind":1.3,"seed":14}},{"id":"rose","label":"Rose, a few lanterns","params":{"palette":"rose","count":35,"glow":1.2,"moon":0.7,"seed":3}},{"id":"silver","label":"Silver, full moon","params":{"palette":"silver","moon":1.4,"stars":1.3,"count":55,"seed":21}},{"id":"calm","label":"Calm night, no wind","params":{"count":45,"wind":0.2,"sway":0.5,"water":0.4,"moon":0,"seed":6}}],"output":{"width":1080,"height":1080,"fps":30,"durationSeconds":16,"posterSeconds":6,"alpha":false,"motion":"procedural","loop":{"seamless":true,"cycleSeconds":16,"method":"Each lantern flies once up the sky per loop, released at a fixed share of it, so lanterns are always in flight and the one that burns out at the top is replaced by one released behind the shore; sways, flames and stars are sines of whole cycles per loop and the lake's ripples move on circles of a noise, so the last frame meets the first."},"seed":{"param":"seed","behavior":"Seed places every lantern across the sky, its release time, size, sway and colour, and the stars and the shore lights: same seed, same night."}},"composition":{"inputs":"Time within the loop; the mood, the number of lanterns, wind, sway, glow, moon, stars, lake and seed.","outputs":"A full frame: the sky and its stars on a quad, the lanterns as instanced quads, then the shore and lake on another quad.","coordinates":"The frame is -1 … 1 in height (x scaled by the aspect ratio); the shoreline is at y = -0.34, the lake below it; lanterns rise from just under the shore to between half the sky and above the top, depending on their depth.","lighting":"Self-lit: every lantern is a glowing paper body with a flame and a halo; the bloom adds the glare; the lake reflects the sky and the lanterns; the moon casts a path on the water.","timing":"update(time, loopSeconds) sets the loop phase; frames render in any order.","compatibleWith":["kinetic-title","number-reveal"],"notes":["Lantern i is released at phase i/n plus a jitter; its height is linear in its progress along its flight, it shrinks by a third as it climbs and fades out over the last quarter, so nothing pops.","JS evaluates every lantern each frame (one pure function of the loop phase) and gives the same positions to the instanced quads and to the lake shader, which loops over them to draw the reflections."]},"reuse":["Hopeful music or lyric backdrop: Warm gold, moonlit lake.","Festival or wedding title: Festival colours.","Quiet wellbeing or memorial scene: Calm night, no wind."],"integration":{"newProject":"Create a WebGLRenderer, createSkyLanterns() and createBloomPass(renderer, { width, height }); call lanterns.setSize(width, height), then each frame lanterns.update(time, loopSeconds) and bloom.render(lanterns.scene, lanterns.camera).","existingProject":"Copy src/sky-lanterns.js; render lanterns.scene with lanterns.camera into a render target (or through the bloom pass) as the backdrop of your scene."},"performance":{"notes":"Two full-screen passes (sky, then shore and lake), 70 instanced lantern quads and a small bloom; the lake loops over the lanterns per pixel. A few milliseconds a frame at 1080p on an integrated Intel GPU.","limits":"Software WebGL (no GPU) renders in a second or two a frame."},"limitations":["The lanterns are painted billboards that face the camera: they tilt and sway but do not turn to show their other sides.","The camera is fixed and the sky does not turn; the moon does not move."],"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/light-atmosphere/paper-lantern-release and firefly-lantern (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original scene: lantern positions as one pure function of the loop's phase (continuous release, exact loop), painted-paper lanterns with ribs and flame, a starry sky with moon, a lake with ripple-broken reflections of the lanterns, and the frame/time contract.","changelog":[{"version":"1.0.0","date":"2026-10-05","notes":"Initial release."}],"verification":{"testedOn":"2026-10-06","inputs":{"sky-lanterns@1.0.0":"817883301e9c4c762193b7819062cb8cf024fe0c0dc5e1ce2bcd4408dbb6f82d","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":1080,"fps":30,"frames":480,"renderSeconds":1824.9,"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/sky-lanterns/1.0.0/poster.webp","preview":"/media/sky-lanterns/1.0.0/preview.mp4","sample":"/media/sky-lanterns/1.0.0/sample.mp4","sampleBytes":2940162}},"files":[{"path":"LICENSE","size":1072,"sha256":"8a5f3a96f07e11522ec4bdd0a583356f99bad1245920f9709cee09b995a45153","contentType":"text/plain; charset=utf-8","url":"https://aipixelwizard.com/registry/sky-lanterns/1.0.0/LICENSE"},{"path":"asset.json","size":10932,"sha256":"ac3689bb3c90bc7ca27a4c4fdb5a662d80d61fcd996ff0dd1ad1c1a30dfe3dd0","contentType":"application/json; charset=utf-8","url":"https://aipixelwizard.com/registry/sky-lanterns/1.0.0/asset.json"},{"path":"demo.js","size":1200,"sha256":"43885acb26b4090fc1ddc53898de5d967e022526badaca4de0cc76d6ad6e6433","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/sky-lanterns/1.0.0/demo.js"},{"path":"index.html","size":526,"sha256":"b5bacd48bacb62fe6424f6179fbed8a2d92d5b40bc6fff0eaee1555157d7464c","contentType":"text/html; charset=utf-8","url":"https://aipixelwizard.com/registry/sky-lanterns/1.0.0/index.html"},{"path":"src/sky-lanterns.js","size":26550,"sha256":"cffcc03ed3720061c145d54c4c82b77ba487162085c8028a9e22209bdddf28ec","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/sky-lanterns/1.0.0/src/sky-lanterns.js"}],"warnings":[]}