← The Lab

02 / Three.js · Particles

Galaxy Generator

Galaxy Generator — spiral particle galaxy with pink core and green outer arms on black

Lab notes

This experiment builds a spiral galaxy from tens of thousands of points. Math places the stars; a live panel lets you reshape arms, spin, and color without rebuilding the scene.

Techniques

GPU point cloud via BufferGeometry. Spiral arms from polar placement and spin. Layered randomness for organic scatter. Radial color mix from a hot core to cooler outer dust.

Stack

Three.js Points / BufferGeometry, procedural attributes, lil-gui, OrbitControls. Static WebGL demo on GitHub Pages.