stellar-forge nodejavascript.com

A GPU particle simulation, in the browser

Structure is not drawn. It is computed.

Four hundred thousand stars, three spiral arms, and no animation file anywhere. Every star is a row in a GPU buffer, and every frame a compute pass works out where it goes next. Move the pointer and the disk bends toward it. Click and a shockwave crosses it.

Forging the galaxy…

WebGPU · compute 400,000 particles — fps

Every orbit is solved in a compute shader — every frame.

What you are looking at

The orbits are a velocity field, not a timeline
Each star is steered toward a circular orbit whose speed falls off with distance from the core, then pulled inward a little. The arms wind because the inner stars are faster — never because a curve was drawn. Move the pointer and the field moves with it.
Reaching the core is not the end
A star that falls inside the centre is recycled to the rim with a fresh angle. That is what keeps the disk alive: an accretion flow rather than a collapse, running for as long as the page is open.
The pointer is a gravity well, and a click is a shockwave
Both are uniforms read by the same pass — one well that follows the cursor, one expanding ring that shoves what it passes. The reaction is immediate because it is the same maths the stars already do, not a separate effect layered on top.
Two paths, one galaxy
The badge under the canvas says which one is running. WebGPU keeps position, velocity and seed in storage buffers and integrates them in a compute pass. WebGL 2 — used when the browser has no adapter — solves the same velocity field analytically in the vertex shader. The picture is the same either way, and the label never claims a compute shader that is not being used.

Privacy, plainly

The simulation runs entirely in your browser on your own graphics chip. It sends nothing about you anywhere, has no account and no server of its own. This page is where a choice exists, and it is yours: there is no analytics script in this document at all — the tag is created by consent.js and only after you answer yes. If you say no, this page makes zero requests to Google and sets no cookie. If you allow it, Google Analytics counts the visit and nothing else: no profile is built here, no advertising identifier is read, and nothing is sold. The answer is stored in this browser's local storage, never in a cookie, and you can change it at any time from in the footer.

The only other thing stored is the density you pick, so the page opens the way you left it. Questions about any of this: [email protected]. Last changed 20 October 2026.