The star map is Three.js running off a custom post type. Each star is a vulcan_star_system post with x/y/z coords, a spectral class and a federation flag. Shortcode pulls them all, localises into JS, Three builds the scene.
The fiddly bit was picking. With a draggable orbit camera every click was firing a select – so I added a 3px drag threshold and the raycaster only runs if the pointer didn’t really move. Easy fix once I worked out what was happening.
Camera is a spherical orbit – theta, phi, radius. One finger drags to rotate, two fingers pinch to zoom. Idle for four seconds and it auto-rotates. Touch the canvas and the auto-rotate turns off.
Background is 1200 random points on a buffer geometry. Cheap and looks fine. Federation worlds get a little billboard ring that always faces the camera – I quite like that detail tbh.
One annoying thing – Three.js dropped the UMD build at r161. So I’m pinned to r160 because I don’t fancy rewriting this as an ES module yet. Probably will do later.