{"id":"particle-galaxy","version":"1.0.0","title":"Particle Galaxy","summary":"A spiral galaxy of tens of thousands of glowing stars turning with differential rotation: the inner stars lap the outer ones. Loops perfectly.","kind":"background","target":"three","collections":["backgrounds","particles","hypnotic-loops"],"tags":["galaxy","spiral galaxy","stars","particles","space","cosmos","differential rotation","glow","nebula","loop","3d"],"loopable":true,"motion":"procedural","durationSeconds":14,"status":"published","media":{"poster":"https://aipixelwizard.com/media/particle-galaxy/1.0.0/poster.webp","preview":"https://aipixelwizard.com/media/particle-galaxy/1.0.0/preview.mp4","sample":"https://aipixelwizard.com/media/particle-galaxy/1.0.0/sample.mp4","sampleBytes":12612931,"sampleNote":"Pre-rendered with the default settings. Customised settings must be exported locally (npm run render)."},"urls":{"page":"https://aipixelwizard.com/visuals/particle-galaxy","manifest":"https://aipixelwizard.com/api/v1/visuals/particle-galaxy/versions/1.0.0","agentMd":"https://aipixelwizard.com/registry/particle-galaxy/1.0.0/agent.md","files":"https://aipixelwizard.com/registry/particle-galaxy/1.0.0/","demo":"https://aipixelwizard.com/registry/particle-galaxy/1.0.0/index.html"},"description":"A spiral galaxy of tens of thousands of glowing particles. Stars are scattered along logarithmic arms round a hot core, golden near the middle and blue-white in the arms, with a thin disc of haze, and the whole galaxy turns with differential rotation: the inner stars lap the outer ones, so the arms wind and unwind as it goes. Choose the number of stars, the number of arms, the colours (classic, rose, emerald or mono), how tightly the arms wind, how many laps the outer stars make per loop, the seed and whether the camera sways.","role":"Scene (3D, three.js): a cosmic, high-impact space backdrop for science, music and sci-fi content.","useCases":["A space, astronomy or sci-fi title scene","A cosmic backdrop for music or talks","An ambient particle loop"],"synonyms":["spiral galaxy","star field","milky way","cosmic spiral","star cluster","space background"],"digest":"64a097fe1b4c937368956f0f884e4dadcb51734cce24d4557a2665a7b4638c46","implementation":{"target":"three","runtime":"browser","language":"javascript","module":"esm","entry":"src/particle-galaxy.js","exports":[{"name":"createParticleGalaxy","signature":"createParticleGalaxy({ stars?, arms?, palette?, twist?, laps?, seed? }) => { group, setProgress(progress), setView(heightPx, fovDeg), dispose() }","description":"The galaxy as one Points object plus a core glow, about 16 across in the xz plane; call setView with the render height and field of view; render through createBloomPass."},{"name":"createBloomPass","signature":"createBloomPass(renderer, { width, height, glow?, exposure?, grain? }) => { render(scene, camera, output?), dispose() }","description":"A small bloom with an anti-aliased, depth-tested scene target."},{"name":"PALETTES","signature":"PALETTES: { classic, rose, emerald, mono }","description":"Colours of the core, the arms' middle and their outer edge."}],"reusable":["src/particle-galaxy.js"],"demo":"demo.js","harness":"index.html"},"dependencies":[{"id":"three","version":"0.185.1","scope":"source","reason":"Renderer, points and shader materials."},{"id":"apw-runtime","version":"1.0.0","scope":"demo","reason":"Demo harness."}],"uses":[],"usedBy":[],"params":[{"key":"stars","label":"Stars","type":"integer","min":4000,"max":60000,"step":1000,"default":24000},{"key":"arms","label":"Arms","type":"integer","min":1,"max":6,"step":1,"default":3},{"key":"palette","label":"Colours","type":"select","default":"classic","options":[{"value":"classic","label":"Classic"},{"value":"rose","label":"Rose"},{"value":"emerald","label":"Emerald"},{"value":"mono","label":"Mono"}]},{"key":"twist","label":"Arm winding","type":"number","min":0.4,"max":2,"step":0.1,"default":1},{"key":"laps","label":"Outer laps per loop","type":"integer","min":1,"max":3,"step":1,"default":1},{"key":"seed","label":"Seed","type":"integer","min":1,"max":999,"step":1,"default":15},{"key":"orbit","label":"Camera sway","type":"boolean","default":true}],"presets":[{"id":"default","label":"Classic, three arms","params":{}},{"id":"rose","label":"Rose, tight arms","params":{"palette":"rose","arms":4,"twist":1.6,"seed":8}},{"id":"emerald","label":"Emerald, two arms, dense","params":{"palette":"emerald","arms":2,"stars":48000,"seed":22}},{"id":"mono","label":"Mono, many arms","params":{"palette":"mono","arms":6,"twist":0.7,"stars":16000}}],"output":{"width":1080,"height":1080,"fps":30,"durationSeconds":14,"posterSeconds":3,"alpha":false,"motion":"procedural","loop":{"seamless":true,"cycleSeconds":14,"method":"Every star makes a whole number of laps per loop (the inner ones more), its twinkle runs whole cycles and the camera tilt is a sine of the loop, so the last frame meets the first."},"seed":{"param":"seed","behavior":"Seed scatters the stars, their sizes, brightness and positions in the arms: same seed, same galaxy."}},"composition":{"inputs":"Time within the loop; the stars, arms, colours, winding, laps, seed and camera sway.","outputs":"A full frame rendered in 3D through an anti-aliased bloom.","coordinates":"The galaxy lies in the xz plane centred on the origin, stars out to a radius of 8; the camera looks down at about 36° from 28 away.","lighting":"Self-lit additive points; the bloom gives the glow.","timing":"setProgress(progress) sets one uniform; the star positions are worked out in the vertex shader; frames render in any order.","compatibleWith":["kinetic-title","number-reveal"],"notes":["Stars are drawn as soft round points sized in the shader and tinted by their radius."]},"reuse":["Space title: Classic, three arms.","Dreamy: Rose, tight arms.","Dense: Emerald, two arms."],"integration":{"newProject":"Create a WebGLRenderer, createParticleGalaxy() and createBloomPass(renderer, { width, height }); call galaxy.setView(height, fov) once, then each frame galaxy.setProgress(progress) and bloom.render(scene, camera).","existingProject":"Copy src/particle-galaxy.js; add galaxy.group to your scene, call setView and render through createBloomPass."},"performance":{"notes":"One draw call of up to 60 000 points with all motion in the vertex shader, plus the bloom: about 3 ms a frame on an integrated Intel GPU.","limits":"Software WebGL renders in about three seconds a frame."},"limitations":["Star sizes are set in the shader from a scale you give with setView; change the render size and call it again.","The stars follow circular orbits; there is no gravity simulation."],"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/particle-systems/particle-galaxy (MIT) and rebuilt for AI Pixel Wizard in October 2026 as an original scene: logarithmic spiral arms of shader-driven point stars with whole laps per star on a differential rotation, through a bloom, on an exact loop.","changelog":[{"version":"1.0.0","date":"2026-10-05","notes":"Initial release."}],"verification":{"testedOn":"2026-10-06","inputs":{"particle-galaxy@1.0.0":"64a097fe1b4c937368956f0f884e4dadcb51734cce24d4557a2665a7b4638c46","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":420,"renderSeconds":921.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/particle-galaxy/1.0.0/poster.webp","preview":"/media/particle-galaxy/1.0.0/preview.mp4","sample":"/media/particle-galaxy/1.0.0/sample.mp4","sampleBytes":12612931}},"files":[{"path":"LICENSE","size":1072,"sha256":"8a5f3a96f07e11522ec4bdd0a583356f99bad1245920f9709cee09b995a45153","contentType":"text/plain; charset=utf-8","url":"https://aipixelwizard.com/registry/particle-galaxy/1.0.0/LICENSE"},{"path":"asset.json","size":8039,"sha256":"e05b2167bde0e8aa033b5e0db10a154d96165708139f33650cdde5fff20aca21","contentType":"application/json; charset=utf-8","url":"https://aipixelwizard.com/registry/particle-galaxy/1.0.0/asset.json"},{"path":"demo.js","size":1579,"sha256":"2ece5e523d471e0489c87d472bdae965e2d170db48235d483ab2da013f841178","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/particle-galaxy/1.0.0/demo.js"},{"path":"index.html","size":529,"sha256":"556f59f103895cbf3b8351bd262fad34a2cce909554a9fc53d499fd9faafd27d","contentType":"text/html; charset=utf-8","url":"https://aipixelwizard.com/registry/particle-galaxy/1.0.0/index.html"},{"path":"src/particle-galaxy.js","size":12996,"sha256":"748148da4d14f2730506568971dd40e44ccd51f7d2ab213f3d9db6320e526aa6","contentType":"text/javascript; charset=utf-8","url":"https://aipixelwizard.com/registry/particle-galaxy/1.0.0/src/particle-galaxy.js"}],"warnings":[]}