Word GalaxyMotion · ZainSpire ← Library

three.js · 3D letters · your own word

A whole galaxy,
spelling your name.

Every star here is a letter of your word. They circle the centre in three spiral arms, inner stars faster than outer ones, the way real galaxies turn. Press Write and the stars fly in to spell your word, then drift back into orbit. Drag to turn the galaxy.

drag to turn
HTML · CSS · JavaScript · no librariesDownload the code ↓

Stars that are letters

One draw call

All the stars are a single three.js Points object. A small texture holds each letter of your word, and every star picks its own letter from it in the shader, so thousands of letters cost about the same as one.

Why it looks real

Inner stars move faster

Each star turns around the centre at a speed that drops with distance, so the arms slowly wind up like a real spiral galaxy. All of this is worked out on the graphics card every frame.

Write your word

Every star has two homes

Each star also knows a spot inside your typed word. Press Write and the shader blends from its orbit to that spot, each star a little late, so the word forms like a flock landing.