{
  "schemaVersion": 1,
  "id": "aurora-borealis",
  "version": "1.0.0",
  "status": "published",
  "kind": "background",
  "title": "Aurora Borealis",
  "summary": "The northern lights rippling over a frozen lake, a cabin's window glowing on the shore. Loops perfectly.",
  "description": "Curtains of light folding and rippling across a starry sky, pink at their lower edge, green through the body and violet at the top, with a pale Milky Way behind them, a forested shore with a small cabin whose window glows in the dark, and the whole sky mirrored in the frozen lake. The curtains sway, shimmer along their vertical rays and brighten in slow surges, while the camera pans gently. Choose the colours (classic green, violet and pink, cyan and blue, or a rare red aurora), how many curtains (one to three), how bright they are, the stars and the Milky Way, whether the cabin is there, and how much the ice mirrors.",
  "role": "Background (WebGL shader, full frame): a magical, calm night sky for travel, wellness and fantasy content.",
  "collections": [
    "backgrounds",
    "hypnotic-loops"
  ],
  "tags": [
    "aurora borealis",
    "northern lights",
    "night sky",
    "stars",
    "milky way",
    "frozen lake",
    "cabin",
    "winter",
    "calm",
    "magical",
    "loop",
    "background"
  ],
  "synonyms": [
    "aurora",
    "northern lights animation",
    "polar lights",
    "aurora loop",
    "night sky background",
    "arctic night",
    "starry sky",
    "iceland aurora"
  ],
  "useCases": [
    "A calm, awe-inspiring backdrop for narration, meditation and sleep videos",
    "A travel intro or a winter holiday scene",
    "A fantasy or sci-fi establishing shot"
  ],
  "featured": null,
  "publishedAt": "2026-10-06",
  "implementation": {
    "target": "three",
    "runtime": "browser",
    "language": "javascript",
    "module": "esm",
    "entry": "src/aurora-borealis.js",
    "exports": [
      {
        "name": "createAurora",
        "signature": "createAurora({ palette?, curtains?, intensity?, cabin?, milkyWay?, stars?, reflection?, seed? }) => { scene, camera, material, setSize(width, height), update(time, loopSeconds), dispose() }",
        "description": "The whole sky as one full-screen shader: render its scene with its camera after setSize and update."
      },
      {
        "name": "PALETTES",
        "signature": "PALETTES: { green, violet, cyan, red }",
        "description": "The colourways: the low edge, the body and the top of the curtains, and the stars."
      }
    ],
    "reusable": [
      "src/aurora-borealis.js"
    ],
    "demo": "demo.js",
    "harness": "index.html"
  },
  "dependencies": [
    {
      "id": "three",
      "version": "0.185.1",
      "reason": "Renderer and the full-screen shader."
    },
    {
      "id": "apw-runtime",
      "version": "1.0.0",
      "scope": "demo",
      "reason": "Demo harness."
    }
  ],
  "params": [
    {
      "key": "palette",
      "label": "Colours",
      "type": "select",
      "default": "green",
      "options": [
        {
          "value": "green",
          "label": "Classic green"
        },
        {
          "value": "violet",
          "label": "Violet and pink"
        },
        {
          "value": "cyan",
          "label": "Cyan and blue"
        },
        {
          "value": "red",
          "label": "Rare red"
        }
      ]
    },
    {
      "key": "curtains",
      "label": "Curtains",
      "type": "integer",
      "min": 1,
      "max": 3,
      "step": 1,
      "default": 2
    },
    {
      "key": "intensity",
      "label": "Brightness",
      "type": "number",
      "min": 0.5,
      "max": 1.8,
      "step": 0.05,
      "default": 1
    },
    {
      "key": "cabin",
      "label": "Cabin on the shore",
      "type": "boolean",
      "default": true
    },
    {
      "key": "milkyWay",
      "label": "Milky Way",
      "type": "number",
      "min": 0,
      "max": 1.5,
      "step": 0.1,
      "default": 1
    },
    {
      "key": "stars",
      "label": "Stars",
      "type": "number",
      "min": 0.3,
      "max": 1.6,
      "step": 0.1,
      "default": 1
    },
    {
      "key": "reflection",
      "label": "Mirror in the ice",
      "type": "number",
      "min": 0,
      "max": 1,
      "step": 0.05,
      "default": 1
    },
    {
      "key": "seed",
      "label": "Seed",
      "help": "Changes the stars, the hills and trees, where the curtains fold and the pattern of their rays.",
      "type": "integer",
      "min": 1,
      "max": 999,
      "step": 1,
      "default": 3
    }
  ],
  "presets": [
    {
      "id": "default",
      "label": "Classic green over the lake",
      "params": {}
    },
    {
      "id": "violet",
      "label": "Violet and pink, three curtains",
      "params": {
        "palette": "violet",
        "curtains": 3,
        "seed": 6
      }
    },
    {
      "id": "cyan",
      "label": "Cyan, no cabin",
      "params": {
        "palette": "cyan",
        "cabin": false,
        "milkyWay": 1.3,
        "seed": 11
      }
    },
    {
      "id": "red",
      "label": "Rare red storm",
      "params": {
        "palette": "red",
        "intensity": 1.4,
        "curtains": 3,
        "seed": 19
      }
    }
  ],
  "output": {
    "width": 1080,
    "height": 1080,
    "fps": 30,
    "durationSeconds": 12,
    "posterSeconds": 4,
    "alpha": false,
    "motion": "procedural",
    "loop": {
      "seamless": true,
      "cycleSeconds": 12,
      "method": "Every sway, shimmer and surge is a sine with a whole number of cycles per loop or a noise read round a circle in time, the stars twinkle in whole cycles and the pan is a sine of the loop, so the last frame meets the first."
    },
    "seed": {
      "param": "seed",
      "behavior": "Seed places the stars, shapes the hills and the trees, and sets where the curtains fold and the pattern of their rays: same seed, same sky."
    }
  },
  "composition": {
    "inputs": "Time within the loop; the colours, number of curtains, brightness, cabin, stars and mirror.",
    "outputs": "A full frame, drawn by one shader on a full-screen quad.",
    "coordinates": "Screen space: the horizon sits in the lower third; the sky is drawn above it and mirrored below.",
    "lighting": "Self-lit: every light is part of the shader.",
    "timing": "update(time, loopSeconds) sets the loop phase; frames render in any order.",
    "compatibleWith": [
      "kinetic-title",
      "gradient-background"
    ],
    "notes": [
      "No image files: stars, hills, trees and the cabin are drawn from functions, antialiased at any size; the only texture is a small noise field baked in code from the seed.",
      "Each curtain is a thin sheet; every view ray is stepped up through it in 36 slices and the light of each slice is integrated exactly, so the curtain stays crisp however low or edge-on you look at it, with the colours of real auroras (pink low, green in the middle, violet or red high)."
    ]
  },
  "reuse": [
    "Meditation or sleep video: Classic green over the lake, slow, with a soft voice-over.",
    "Travel or winter intro: Violet and pink with a title in the dark sky.",
    "Fantasy scene: Rare red storm under a kinetic title."
  ],
  "integration": {
    "newProject": "Create a WebGLRenderer, createAurora(), call setSize with the canvas size, then each frame update(time, loopSeconds) and renderer.render(aurora.scene, aurora.camera).",
    "existingProject": "Copy src/aurora-borealis.js and render it into a render target as the backdrop of your scene."
  },
  "performance": {
    "notes": "One full-screen pass and one small baked noise texture: 36 slices through up to three curtains per pixel. About 17 ms a frame at 1080p with two curtains on an integrated Intel GPU.",
    "limits": "Software WebGL (no GPU) renders slowly."
  },
  "limitations": [
    "The shore is a silhouette: the trees and the cabin have no detail.",
    "The aurora is drawn from a camera at the ground looking north; there is no overhead corona.",
    "Where a curtain is seen almost edge-on at the sides of the frame, its rays blend into a soft glow."
  ],
  "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"
      }
    ]
  },
  "provenance": "Adapted from the owner's threejs-sketches/fire-weather/aurora-storm (and light-atmosphere/aurora-curtain, space-cosmic/webgpu-aurora-borealis, nature-organic/aurora-waves, MIT), rebuilt for AI Pixel Wizard in October 2026 as an original shader: thin curtains standing on swaying curves, integrated exactly along every view ray, with shimmering vertical rays of every length and real auroral colours, stars, a Milky Way, a forest shore with a cabin, a mirror in the ice, an exact loop and the frame/time contract.",
  "changelog": [
    {
      "version": "1.0.0",
      "date": "2026-10-05",
      "notes": "Initial release."
    }
  ]
}
