{"id":"lava-lamp","version":"1.0.0","title":"Lava Lamp","summary":"A glowing lava lamp: wax swells off the hot pool, rises through the liquid, cools and sinks back. Loops perfectly.","kind":"object","target":"three","collections":["satisfying","hypnotic-loops","backgrounds"],"tags":["lava lamp","retro","70s","lofi","wax","blobs","metaballs","glow","chill","hypnotic","loop","3d"],"loopable":true,"motion":"procedural","durationSeconds":15,"status":"published","media":{"poster":"https://aipixelwizard.com/media/lava-lamp/1.0.0/poster.webp","preview":"https://aipixelwizard.com/media/lava-lamp/1.0.0/preview.mp4","sample":"https://aipixelwizard.com/media/lava-lamp/1.0.0/sample.mp4","sampleBytes":1036816,"sampleNote":"Pre-rendered with the default settings. Customised settings must be exported locally (npm run render)."},"urls":{"page":"https://aipixelwizard.com/visuals/lava-lamp","manifest":"https://aipixelwizard.com/api/v1/visuals/lava-lamp/versions/1.0.0","agentMd":"https://aipixelwizard.com/registry/lava-lamp/1.0.0/agent.md","files":"https://aipixelwizard.com/registry/lava-lamp/1.0.0/","demo":"https://aipixelwizard.com/registry/lava-lamp/1.0.0/index.html"},"description":"A classic lava lamp glowing in a dark room: a tapered glass bottle on a turned metal base with a pointed cap, a hot bulb underneath and blobs of wax that swell from the pool at the bottom, rise through the glowing liquid, cool at the top and sink back, merging and splitting on the way. The wax is translucent and brightest near the bulb, with a halo in the liquid round it; the glass reflects and refracts the room. Choose the colours (classic red and amber, violet and blue, lime and teal, rose and gold), the metal of the base (chrome, brass, black or copper), how many blobs ride in the lamp, how hot the bulb burns, and a macro view that puts the camera right up against the glass so the wax fills the frame.","role":"Hero object or background (Three.js 3D): a hypnotic, retro lava lamp for lofi, chill and 70s content.","useCases":["A relaxing, hypnotic background for lofi, study and sleep streams","A retro 70s intro or a groovy music-video backdrop","A calm full-screen macro texture behind titles and quotes"],"synonyms":["lava lamp animation","lava lamp loop","motion lamp","wax lamp","blob lamp","liquid motion background","retro lamp","psychedelic lamp"],"digest":"dd38a3c2d26cfea59ff7e008c9a47e6c79cc823c747908ba42c04957bc9923ca","implementation":{"target":"three","runtime":"browser","language":"javascript","module":"esm","entry":"src/lava-lamp.js","exports":[{"name":"createLavaLamp","signature":"createLavaLamp({ wax?, liquid?, metal?, blobs?, heat?, seed? }) => { group, height, uniforms, update(time, loopSeconds, camera?, pixelHeight?), dispose() }","description":"The lamp as a THREE.Group (1 unit = 10 cm, standing on y = 0, 3.98 tall). update(time, loopSeconds) moves the wax; pass the camera so the wax's edge is antialiased at the right size."},{"name":"createGlowBackdrop","signature":"createGlowBackdrop(glow, wall?) => { mesh, dispose() }","description":"A dark wall washed with the lamp's glow, in opaque material so the glass can refract it."},{"name":"METALS","signature":"METALS: { chrome, brass, black, copper }","description":"Finishes for the base and cap."},{"name":"PALETTES","signature":"PALETTES: { classic, violet, lime, rose }","description":"Suggested wax and liquid colour pairs."}],"reusable":["src/lava-lamp.js"],"demo":"demo.js","harness":"index.html"},"dependencies":[{"id":"three","version":"0.185.1","scope":"source","reason":"Renderer, physical glass and metal, and the wax's ray-marching shader."},{"id":"chrome-material","version":"1.1.0","scope":"demo","reason":"Studio environment light and the contact shadow."},{"id":"apw-runtime","version":"1.0.0","scope":"demo","reason":"Demo harness."}],"uses":[],"usedBy":[],"params":[{"key":"palette","label":"Colours","type":"select","default":"classic","options":[{"value":"classic","label":"Classic red and amber"},{"value":"violet","label":"Violet and blue"},{"value":"lime","label":"Lime and teal"},{"value":"rose","label":"Rose and gold"}]},{"key":"metal","label":"Base and cap","type":"select","default":"chrome","options":[{"value":"chrome","label":"Chrome"},{"value":"brass","label":"Brass"},{"value":"black","label":"Black"},{"value":"copper","label":"Copper"}]},{"key":"view","label":"View","type":"select","default":"lamp","options":[{"value":"lamp","label":"Whole lamp"},{"value":"macro","label":"Macro close-up"}]},{"key":"blobs","label":"Blobs","type":"integer","min":3,"max":10,"step":1,"default":7},{"key":"heat","label":"Bulb heat","help":"How brightly the bulb lights the wax and the liquid.","type":"number","min":0.6,"max":1.6,"step":0.05,"default":1},{"key":"room","label":"Room colour","type":"color","default":"#09060c"},{"key":"table","label":"Table","type":"color","default":"#15100f"},{"key":"seed","label":"Seed","help":"Changes the size and path of every blob.","type":"integer","min":1,"max":999,"step":1,"default":2}],"presets":[{"id":"default","label":"Classic red and amber","params":{}},{"id":"violet","label":"Violet and blue, brass base","params":{"palette":"violet","metal":"brass","blobs":6,"room":"#07060f","seed":5}},{"id":"lime","label":"Lime and teal, black base","params":{"palette":"lime","metal":"black","blobs":8,"heat":1.2,"room":"#050b0a","seed":9}},{"id":"macro","label":"Rose and gold, macro","params":{"palette":"rose","metal":"copper","view":"macro","blobs":5,"seed":14}}],"output":{"width":1080,"height":1080,"fps":30,"durationSeconds":15,"posterSeconds":5,"alpha":false,"motion":"procedural","loop":{"seamless":true,"cycleSeconds":15,"method":"Every blob makes a whole number of trips up and down the bottle per loop, with its sideways sway and its breathing in whole cycles, and the pool swells in whole cycles, so the last frame meets the first."},"seed":{"param":"seed","behavior":"Seed picks every blob's size, starting point and path: same seed, same lamp."}},"composition":{"inputs":"Time within the loop; the colours, metal, blob count, bulb heat and view.","outputs":"A THREE.Group: the base, glass, cap and the wax volume, standing on y = 0 at the origin.","coordinates":"1 unit = 10 cm. The lamp is 3.98 tall; the bottle runs from 0.92 to 3.3 and is 1.4 wide at the bottom, 0.72 at the neck.","lighting":"Physical glass and metal: needs scene.environment. The wax is lit by the bulb inside its own shader; add point lights in the wax colour to wash the base and the table.","timing":"update(time, loopSeconds) is a pure function of time; frames render in any order.","compatibleWith":["chrome-material","orbit-camera","kinetic-title"],"notes":["The wax volume is opaque on purpose: three.js transmission refracts only opaque objects, so the glass can show it.","Pass the camera to update() so the wax's soft edge is antialiased at the right size."]},"reuse":["Lofi stream: Classic red and amber, camera drift on, with a small caption or a music player.","Retro intro: Violet and blue with a brass base, and a chunky 70s title.","Full-screen texture: Rose and gold in macro view behind a quote."],"integration":{"newProject":"Set scene.environment (createStudioEnvironment from Chrome Material works), add createGlowBackdrop(...).mesh behind and createLavaLamp().group, and call update(time, loopSeconds, camera, height) each frame.","existingProject":"Copy src/lava-lamp.js. Add the group to your scene (scale it to suit), keep what is behind it opaque so the glass can refract it, and call update every frame."},"performance":{"notes":"One ray-marched pass over the bottle's silhouette (up to 96 steps over at most eleven metaballs) plus one transmissive glass shell. Smooth at 1080p on laptop GPUs.","limits":"Software WebGL (no GPU) renders slowly. Transmission renders the opaque scene a second time."},"limitations":["The blobs follow choreographed paths rather than a heat-and-buoyancy simulation: they never stick to the glass or pinch off in different places each time.","The lamp stands still; only the camera moves."],"license":{"spdx":"MIT","notice":"Copyright (c) 2026 AI Pixel Wizard. Released under the MIT License. See LICENSE in this folder.","thirdParty":[{"name":"three.js","version":"0.185.1","license":"MIT","url":"https://github.com/mrdoob/three.js"}]},"rights":{"approvedForPublicRelease":true},"provenance":"Adapted from the owner's threejs-sketches/webgpu-lava-lamp (liquid-fluid, MIT), rebuilt for AI Pixel Wizard in October 2026 in WebGL: a modelled lamp with physical glass and metal, translucent ray-marched metaball wax lit by the bulb, a halo in the liquid, four colourways, a macro view, an exact loop and the frame/time contract.","changelog":[{"version":"1.0.0","date":"2026-10-05","notes":"Initial release."}],"verification":{"testedOn":"2026-10-06","inputs":{"lava-lamp@1.0.0":"dd38a3c2d26cfea59ff7e008c9a47e6c79cc823c747908ba42c04957bc9923ca","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":450,"renderSeconds":3174.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/lava-lamp/1.0.0/poster.webp","preview":"/media/lava-lamp/1.0.0/preview.mp4","sample":"/media/lava-lamp/1.0.0/sample.mp4","sampleBytes":1036816}},"files":[{"path":"LICENSE","size":1072,"sha256":"8a5f3a96f07e11522ec4bdd0a583356f99bad1245920f9709cee09b995a45153","contentType":"text/plain; charset=utf-8","url":"https://aipixelwizard.com/registry/lava-lamp/1.0.0/LICENSE"},{"path":"asset.json","size":10122,"sha256":"782990a8d3f5bf5807b13dd3c972e38106a2ebbd13616e40476dd04b893d75c3","contentType":"application/json; charset=utf-8","url":"https://aipixelwizard.com/registry/lava-lamp/1.0.0/asset.json"},{"path":"demo.js","size":3343,"sha256":"28f3634348016642dfd2e2d8f438b9104e6b562e12b8bf56c70e8b5aa93a2337","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/lava-lamp/1.0.0/demo.js"},{"path":"index.html","size":523,"sha256":"1e0dcb095eefa756c91e032d675ce3df5f32d3d037659fd806d4df7f004d8b12","contentType":"text/html; charset=utf-8","url":"https://aipixelwizard.com/registry/lava-lamp/1.0.0/index.html"},{"path":"src/lava-lamp.js","size":13034,"sha256":"2a6930fd93d038ad9b1c700c050ed6cfcccddd2e9f343c66aa0595534abbe3bb","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/lava-lamp/1.0.0/src/lava-lamp.js"}],"warnings":[]}