{"id":"falling-leaves","version":"1.0.0","title":"Falling Leaves","summary":"Autumn leaves swaying, tipping and turning over as they fall, in maple, oak and birch shapes. Loops perfectly.","kind":"effect","target":"canvas2d","collections":["bouncing-falling","particles","hypnotic-loops"],"tags":["falling leaves","autumn","fall","leaves","nature","seasons","particles","maple","falling","loop"],"loopable":true,"motion":"procedural","durationSeconds":12,"status":"published","media":{"poster":"https://aipixelwizard.com/media/falling-leaves/1.0.0/poster.webp","preview":"https://aipixelwizard.com/media/falling-leaves/1.0.0/preview.mp4","sample":"https://aipixelwizard.com/media/falling-leaves/1.0.0/sample.mp4","sampleBytes":3145092,"sampleNote":"Pre-rendered with the default settings. Customised settings must be exported locally (npm run render)."},"urls":{"page":"https://aipixelwizard.com/visuals/falling-leaves","manifest":"https://aipixelwizard.com/api/v1/visuals/falling-leaves/versions/1.0.0","agentMd":"https://aipixelwizard.com/registry/falling-leaves/1.0.0/agent.md","files":"https://aipixelwizard.com/registry/falling-leaves/1.0.0/","demo":"https://aipixelwizard.com/registry/falling-leaves/1.0.0/index.html"},"description":"Autumn leaves coming down the way real ones do: swaying side to side on a slow pendulum, tipping with each swing, turning over (a leaf seen edge-on thins to a line and shows its darker underside) and drifting a little on the wind. Each leaf is a smooth shape with a midrib and veins, in one of five maple, oak, birch, willow and rounded shapes, in reds, golds and browns (or spring greens). Every leaf falls a whole number of screen heights per loop and every sway and flip makes whole cycles, so the loop is exact. Choose the number of leaves, the colours, the wind, the sky colours and the seed.","role":"Particle overlay (Canvas 2D): autumn, nature and calm-seasonal atmosphere.","useCases":["An autumn or harvest title backdrop","A nature or wellness video atmosphere","A seasonal greeting or sale overlay"],"synonyms":["autumn leaves","leaf fall","leaves falling","fall foliage","seasonal overlay","maple leaves"],"digest":"e167c29a72699dcfdf4747f901badc6ad0ddfed2d97bab61bdb78882fe1c7b94","implementation":{"target":"canvas2d","runtime":"browser","language":"javascript","module":"esm","entry":"src/falling-leaves.js","exports":[{"name":"createFallingLeaves","signature":"createFallingLeaves({ leaves?, palette?, wind?, seed? }) => { draw(ctx, info, width, height) }","description":"Canvas 2D leaf layer; info.progress (0 to 1 over the loop) sets the place in the loop; draws on top of the canvas."},{"name":"PALETTES","signature":"PALETTES: { autumn, spring, gold }","description":"Leaf face and underside colours."}],"reusable":["src/falling-leaves.js"],"demo":"demo.js","harness":"index.html"},"dependencies":[{"id":"apw-runtime","version":"1.0.0","scope":"demo","reason":"Demo harness. The reusable source has no dependencies."}],"uses":[],"usedBy":[],"params":[{"key":"leaves","label":"Leaves","type":"integer","min":10,"max":200,"step":5,"default":60},{"key":"palette","label":"Colours","type":"select","default":"autumn","options":[{"value":"autumn","label":"Autumn"},{"value":"spring","label":"Spring"},{"value":"gold","label":"Gold"}]},{"key":"wind","label":"Wind","type":"number","min":0,"max":1.5,"step":0.1,"default":0.5},{"key":"skyTop","label":"Sky top","type":"color","default":"#3a2a24"},{"key":"skyBottom","label":"Sky bottom","type":"color","default":"#c8864a"},{"key":"seed","label":"Seed","type":"integer","min":1,"max":999,"step":1,"default":8}],"presets":[{"id":"default","label":"Autumn, warm","params":{}},{"id":"spring","label":"Spring greens","params":{"palette":"spring","skyTop":"#3a6a8a","skyBottom":"#d6efe0","leaves":45,"seed":4}},{"id":"gold","label":"Gold, many","params":{"palette":"gold","leaves":140,"skyTop":"#2a1a10","skyBottom":"#8a5a22","seed":15}},{"id":"gust","label":"Windy day","params":{"wind":1.5,"leaves":90,"skyTop":"#4a4a5a","skyBottom":"#c8a07a","seed":21}}],"output":{"width":1080,"height":1080,"fps":30,"durationSeconds":12,"posterSeconds":3,"alpha":false,"motion":"procedural","loop":{"seamless":true,"cycleSeconds":12,"method":"Every leaf falls a whole number of screen heights per loop and its sway, flip and spin are whole cycles, so the last frame meets the first."},"seed":{"param":"seed","behavior":"Seed places and shapes the leaves and sets their sway and flip: same seed, same fall."}},"composition":{"inputs":"Canvas 2D context, info.progress (0 to 1 over the loop), width, height.","outputs":"Draws leaves on top of the canvas; does not clear it.","coordinates":"Leaves are placed in fractions of the canvas; sizes scale with the smaller side; nearer leaves are larger and fall faster.","lighting":"A soft drop shadow lifts each leaf; the underside is darker.","timing":"Pure function of info.progress.","compatibleWith":["kinetic-title","gradient-background"],"notes":["A leaf seen edge-on is drawn as a thin sliver of its underside."]},"reuse":["Autumn title: Autumn, warm.","Spring: Spring greens.","Harvest: Gold, many."],"integration":{"newProject":"Create it once, then each frame draw your backdrop and call draw(ctx, { progress }, width, height).","existingProject":"Copy src/falling-leaves.js. Call draw on your existing 2D canvas."},"performance":{"notes":"Up to 200 small paths with shadows per frame; a few milliseconds.","limits":"Shadows are the slowest part in software rendering."},"limitations":["Leaves are flat shapes: they turn by squashing, not in true 3D.","They do not land: they leave the bottom and re-enter at the top."],"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":"Original code written for AI Pixel Wizard in October 2026, to the catalog quality bar (docs/QUALITY.md).","changelog":[{"version":"1.0.0","date":"2026-10-08","notes":"Initial release."}],"verification":{"testedOn":"2026-10-08","inputs":{"falling-leaves@1.0.0":"e167c29a72699dcfdf4747f901badc6ad0ddfed2d97bab61bdb78882fe1c7b94","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":"Canvas 2D","width":1080,"height":1080,"fps":30,"frames":360,"renderSeconds":64.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/falling-leaves/1.0.0/poster.webp","preview":"/media/falling-leaves/1.0.0/preview.mp4","sample":"/media/falling-leaves/1.0.0/sample.mp4","sampleBytes":3145092}},"files":[{"path":"LICENSE","size":1072,"sha256":"8a5f3a96f07e11522ec4bdd0a583356f99bad1245920f9709cee09b995a45153","contentType":"text/plain; charset=utf-8","url":"https://aipixelwizard.com/registry/falling-leaves/1.0.0/LICENSE"},{"path":"asset.json","size":6664,"sha256":"5f32919088391fc314518f72746ece525bdd28066f6c109f5364f6e88cf424d3","contentType":"application/json; charset=utf-8","url":"https://aipixelwizard.com/registry/falling-leaves/1.0.0/asset.json"},{"path":"demo.js","size":994,"sha256":"6f38abd606879332313d26bb35d18819232d063fed974bbfb6ff5176c97abd2a","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/falling-leaves/1.0.0/demo.js"},{"path":"index.html","size":528,"sha256":"9015eac2eb27e06c3de929d3b085e9f94abf91a5cf4802eedec350be0013b046","contentType":"text/html; charset=utf-8","url":"https://aipixelwizard.com/registry/falling-leaves/1.0.0/index.html"},{"path":"src/falling-leaves.js","size":5186,"sha256":"a4d4ce6b94e801b0fa398fbc54806d6f642be6d882035484a0a00ffb96fe995c","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/falling-leaves/1.0.0/src/falling-leaves.js"}],"warnings":[]}