The map stopped at the catalogued 50 pc around the Sun — 0.33% of the Galaxy's width — and looked like a point cloud with a search box. Adds the galactic scale above it and the heads-up display the reference map is built from. The Galaxy is not a third coordinate space. It is the same parsec space four orders of magnitude further out, so the model and the star field crossfade against camera distance instead of switching, and the Sun stays where it really is: 8.18 kpc out, on the Orion Spur, between the Sagittarius and Perseus arms. The depth range scales with that distance — one fixed near/far pair cannot both fly into a star and hold the Galaxy. The structure in shared/astro/galaxy.ts is measured: the directions of the centre and the north galactic pole, which fix the disc's 63 degree tilt against the celestial equator; the Sun's galactocentric distance; and a radius, azimuth and pitch angle per arm. The particles scattered around it are not, and cannot be — dust hides the disc, so no catalogue holds the Galaxy's stars. The view says so, and the model fades out before the camera reaches the 50 pc where the real stars are. The rest is the look: polar grids lying in the galactic plane with drop lines from the Sun's neighbours, a scale ladder, a readout panel, range, reticle and frame brackets. Two things had to give way for it. The deep-sky shell is the sky as seen from here, so it dissolves rather than letting the camera fly through a wall of nebulae, and so does the skybox, which is a photograph taken from inside the thing now being viewed from outside. Labels are picked by screen separation rather than distance alone: the Sun's fifteen nearest neighbours are all inside four parsecs and printed as one unreadable clump. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WaySiNst4HhDXBHnMy8p5G
End-to-end tests (Playwright)
These tests run the real Angular dev server in a real Chromium browser, covering interactions
that unit/component tests (under src/**/*.spec.ts, run via npm test) can only approximate
under jsdom — most importantly the galaxy↔system camera-flight transitions (real WebGPU/
WebGL2 initialization + raycaster picking) and cross-view search navigation.
Running
npm run e2e # headless run against a freshly started dev server
npx playwright test --ui # interactive UI mode
npx playwright show-report
playwright.config.ts starts npm run start -- --port=4300 automatically and waits for it to
respond before running the suite (webServer.reuseExistingServer is true outside CI, so an
already-running ng serve on port 4300 is reused instead of starting a second one). Port 4300
is used instead of the Angular CLI's conventional 4200 to avoid colliding with an unrelated
server a developer might already have running there.
Notes
- The Sun (
Sol) is always placed at the coordinate-system origin (x=0,y=0,z=0), which is exactly where the default galaxy-view camera looks.camera-flight.spec.tsrelies on this to reliably click-select it by clicking the center of the canvas, without needing pixel-perfect knowledge of the star field's on-screen layout. - Data (bootstrap fetch of
stars.bin/stars-index.json/bodies.json/exoplanets.json/deepsky.json) loads asynchronously after the page loads, so tests poll (re-click/re-check) rather than assume the scene is interactive immediately afterpage.goto(). deepsky.jsonis the one dataset the scene treats as optional: it only feeds the decorative backdrop, so a failure to load it is logged and the star field comes up regardless.