{"id":"candle-flame","version":"1.0.0","title":"Candle Flame","summary":"A candle burning in the dark: a living flame, glowing wax, a melted crater, one gust and it recovers. Loops perfectly.","kind":"object","target":"three","collections":["hypnotic-loops","satisfying","backgrounds"],"tags":["candle","flame","fire","flicker","cozy","wax","candlelight","romantic","memorial","atmosphere","loop","3d"],"loopable":true,"motion":"procedural","durationSeconds":12,"status":"published","media":{"poster":"https://aipixelwizard.com/media/candle-flame/1.0.0/poster.webp","preview":"https://aipixelwizard.com/media/candle-flame/1.0.0/preview.mp4","sample":"https://aipixelwizard.com/media/candle-flame/1.0.0/sample.mp4","sampleBytes":1715213,"sampleNote":"Pre-rendered with the default settings. Customised settings must be exported locally (npm run render)."},"urls":{"page":"https://aipixelwizard.com/visuals/candle-flame","manifest":"https://aipixelwizard.com/api/v1/visuals/candle-flame/versions/1.0.0","agentMd":"https://aipixelwizard.com/registry/candle-flame/1.0.0/agent.md","files":"https://aipixelwizard.com/registry/candle-flame/1.0.0/","demo":"https://aipixelwizard.com/registry/candle-flame/1.0.0/index.html"},"description":"A candle burning in a dark room, close in: a wax pillar (or a tall taper, or a cluster of three) with a melted crater and drips down its side, a wick with its ember, a brass dish, and a flame that licks and sways, blue at the foot, a bright yellow body, an orange edge and a dark cone round the wick. The wax glows from within near the top and the flame lights the dish, the table and the air round it, flickering with it. Once in the loop a gust bends the flame over and it recovers. Choose the candles, the wax colour, the flame (warm, gold, classic or rose), how restless the flame is, how strong the gust, the glow and the exposure.","role":"Hero object (Three.js 3D): an intimate, atmospheric candle for moods, memorials, holidays and storytelling.","useCases":["A cosy, romantic or reflective backdrop for stories, music and meditation","A memorial, remembrance or vigil moment","A holiday or birthday scene, with the cluster of three"],"synonyms":["candle flame","candlelight","burning candle","flickering candle","candle loop","vigil candle","romantic candle","cozy fire"],"digest":"e785a6beabf9f59176d0cf8d466cf87671ff9f444f79a6c0c3d02daef20dc0c3","implementation":{"target":"three","runtime":"browser","language":"javascript","module":"esm","entry":"src/candle-flame.js","exports":[{"name":"createCandles","signature":"createCandles({ layout?, wax?, flame?, flicker?, gust?, seed? }) => { group, height, dish, update(time, loopSeconds, camera), dispose() }","description":"The candle(s) with their dish, wax, wick, flames, glows and point lights as a THREE.Group (1 unit = 10 cm, dish on y = 0). update turns the flames to face the camera and poses the flicker and the gust."},{"name":"createBloomPass","signature":"createBloomPass(renderer, { width, height, glow?, exposure?, grain? }) => { render(scene, camera, output?), dispose() }","description":"Draws the scene into a half-float target, blurs its bright parts at three scales and composites them with filmic tone mapping and a fixed grain."},{"name":"LAYOUTS","signature":"LAYOUTS: { pillar, taper, cluster }","description":"The candle arrangements."},{"name":"FLAMES","signature":"FLAMES: { warm, gold, candle, rose }","description":"Flame colour sets: inner, middle, outer and glow."}],"reusable":["src/candle-flame.js"],"demo":"demo.js","harness":"index.html"},"dependencies":[{"id":"three","version":"0.185.1","scope":"source","reason":"Renderer, geometry, point lights and the flame shader."},{"id":"chrome-material","version":"1.1.0","scope":"demo","reason":"Studio environment light and the room backdrop."},{"id":"apw-runtime","version":"1.0.0","scope":"demo","reason":"Demo harness."}],"uses":[],"usedBy":[],"params":[{"key":"layout","label":"Candles","type":"select","default":"pillar","options":[{"value":"pillar","label":"A pillar candle"},{"value":"taper","label":"A tall taper"},{"value":"cluster","label":"A cluster of three"}]},{"key":"flame","label":"Flame","type":"select","default":"warm","options":[{"value":"warm","label":"Warm amber"},{"value":"gold","label":"Golden"},{"value":"candle","label":"Classic orange"},{"value":"rose","label":"Rose"}]},{"key":"wax","label":"Wax","type":"color","default":"#f1e6cf"},{"key":"flicker","label":"Restlessness","type":"number","min":0.3,"max":1.8,"step":0.1,"default":1},{"key":"gust","label":"Gust","help":"How far the one gust in the loop bends the flame.","type":"number","min":0,"max":1.5,"step":0.1,"default":1},{"key":"glow","label":"Glow","type":"number","min":0.4,"max":2,"step":0.05,"default":1},{"key":"exposure","label":"Exposure","type":"number","min":0.6,"max":1.8,"step":0.05,"default":1.15},{"key":"room","label":"Room","type":"color","default":"#0a0706"},{"key":"table","label":"Table","type":"color","default":"#2a190f"},{"key":"seed","label":"Seed","help":"Changes the rim, the drips and the flicker's pattern.","type":"integer","min":1,"max":999,"step":1,"default":3}],"presets":[{"id":"default","label":"Pillar candle","params":{}},{"id":"taper","label":"Golden taper","params":{"layout":"taper","flame":"gold","wax":"#e8dcc2","room":"#07080c","gust":0.7,"seed":9}},{"id":"cluster","label":"Three candles","params":{"layout":"cluster","flicker":1.2,"seed":5}},{"id":"rose","label":"Rose wax, rose flame","params":{"flame":"rose","wax":"#f0c7d0","room":"#0d070a","table":"#241218","glow":1,"seed":14}}],"output":{"width":1080,"height":1080,"fps":30,"durationSeconds":12,"posterSeconds":3,"alpha":false,"motion":"procedural","loop":{"seamless":true,"cycleSeconds":12,"method":"The flame's tongues are waves running up it with a whole number of cycles per loop, its brightness and height flicker in whole cycles, and the gust is a single bump well inside the loop, so the last frame meets the first."},"seed":{"param":"seed","behavior":"Seed shapes the melted rim, the drips and each flame's pattern of tongues: same seed, same candle."}},"composition":{"inputs":"Time within the loop; the camera (the flames turn to face it); the layout, wax, flame, flicker and gust.","outputs":"A THREE.Group of candles, dish, flames, glows and point lights, drawn with createBloomPass for the glow.","coordinates":"1 unit = 10 cm. A pillar is 3 wide and 5 tall; the flame is 3.1 tall; the dish stands on y = 0.","lighting":"The flame lights everything through a point light in its colour (with shadows from the tallest); the wax carries its own warm emission near the top. Needs scene.environment only for the brass.","timing":"update(time, loopSeconds, camera) is a pure function of time; frames render in any order.","compatibleWith":["kinetic-title","stop-motion-feel","dither-animation"],"notes":["The flame is a procedural billboard, additive and HDR: draw it with a bloom (createBloomPass) so it glows.","Only the first candle's light casts shadows, to keep it fast."]},"reuse":["Cosy story: Pillar candle behind a handwritten-style title.","Remembrance: Golden taper, slow, with a name and a date.","Birthday or holiday: Three candles, camera drift on."],"integration":{"newProject":"Add createCandles().group over a table, call update(time, loopSeconds, camera) and render through createBloomPass(renderer, { width, height }).render(scene, camera).","existingProject":"Copy src/candle-flame.js. Add the group to your scene and draw it with your own bloom (the flame is HDR); call update every frame."},"performance":{"notes":"A few hundred triangles of wax and a procedural flame quad per candle, one shadow-casting point light and a small bloom chain. Smooth at 1080p on laptop GPUs.","limits":"Software WebGL (no GPU) renders slowly; point-light shadows are the main cost."},"limitations":["The flame is a 2D billboard turned to the camera: it does not have a real volume and looks flat from a very low angle above.","The wax does not melt over the loop; the crater and drips are fixed."],"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-candle-flame (objects-scenes, MIT), rebuilt for AI Pixel Wizard in October 2026 in WebGL: a procedural flame shader (blue foot, dark cone, tongues running up it in whole loop cycles), a modelled candle with a melted crater, drips, a wick and a brass dish, glowing wax, a flickering light that casts shadows, a gust, a bloom and the frame/time contract.","changelog":[{"version":"1.0.0","date":"2026-10-05","notes":"Initial release."}],"verification":{"testedOn":"2026-10-06","inputs":{"candle-flame@1.0.0":"e785a6beabf9f59176d0cf8d466cf87671ff9f444f79a6c0c3d02daef20dc0c3","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":1630.7,"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/candle-flame/1.0.0/poster.webp","preview":"/media/candle-flame/1.0.0/preview.mp4","sample":"/media/candle-flame/1.0.0/sample.mp4","sampleBytes":1715213}},"files":[{"path":"LICENSE","size":1072,"sha256":"8a5f3a96f07e11522ec4bdd0a583356f99bad1245920f9709cee09b995a45153","contentType":"text/plain; charset=utf-8","url":"https://aipixelwizard.com/registry/candle-flame/1.0.0/LICENSE"},{"path":"asset.json","size":10138,"sha256":"fb87d343d1594f614e704e85b7482bf954ddd9d0a1b09c44c090c17607c5078f","contentType":"application/json; charset=utf-8","url":"https://aipixelwizard.com/registry/candle-flame/1.0.0/asset.json"},{"path":"demo.js","size":4940,"sha256":"f15d78f4e1ef4e6219db28f8fc73c51d8f6b5c06f38488724cadf106018be598","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/candle-flame/1.0.0/demo.js"},{"path":"index.html","size":526,"sha256":"956928c9becd0aa17f72ea9aecc313fba8d0bd9236dda824b05f26315b99dfaf","contentType":"text/html; charset=utf-8","url":"https://aipixelwizard.com/registry/candle-flame/1.0.0/index.html"},{"path":"src/candle-flame.js","size":21447,"sha256":"b04ef5f2b22dd587f844955c34f3241d4e73f34b2fb950af43bf3439e44c80e3","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/candle-flame/1.0.0/src/candle-flame.js"}],"warnings":[]}