Rebuild the map chrome against the Star Citizen starmap

Until now this was built from memory — the reference site is blocked by this
environment's egress policy, so the resemblance was asserted rather than
checked. Five screenshots of the real thing arrived, and this is what
comparing against them changed.

Labels say what a thing is, not just what it is called. Every label is now
two lines: the name, then its type in smaller, wider-tracked, dimmer
capitals. This is the single most characteristic element of the reference
and it appears in every frame of it. It also settles a real ambiguity — in a
map that mixes scales, "Orion" is an arm, a nebula and a constellation, and
nothing about a bare name said which one a label pointed at.

For stars the type line distinguishes "System" from "Star", which is the one
thing it can say that the map could not otherwise show: which points are
somewhere you can actually go.

The system view had no body labels at all, where the reference labels every
planet. It does now, which turned out to need two supporting changes. The
overlay had only ever added and removed labels, never moved them, because
stars do not move; planets do, so an existing label is now repositioned
rather than left where the body used to be. And the inner four planets
printed on top of each other in exactly the clump the star labels were
already spread to avoid — so that logic is now shared rather than
duplicated, with system bodies ordered outermost-first. Closing in reverses
it by itself: the outer orbits leave the frame, their labels drop, and the
inner planets take the space.

The chrome follows the reference's layout. The scale ladder is a row of
chamfered tabs at the top left rather than a vertical list of diamonds at
the middle left, and a nameplate across the top centre says what the view is
holding. The centre reticle is a hexagon, which is how the reference locks
onto a body, and stays distinct from the rectangular panel chrome.

Not copied: the ARK/RSI logos, wordmarks, and the bottom-right tool tabs.
The first two are someone else's brand, and the third would be four tabs
opening features this app does not have.

Two e2e assertions moved off bare text matches onto the readout panel's own
title. The nameplate names the same thing the panel does, so "is 'Local
Stars' on screen" became ambiguous — the assertion, not the design, was what
had to give.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WaySiNst4HhDXBHnMy8p5G
This commit is contained in:
Claude
2026-08-05 10:50:07 +00:00
parent 39e7f29086
commit 748cb8927e
10 changed files with 326 additions and 60 deletions
@@ -5,6 +5,16 @@ export interface LabeledPoint {
/** Numeric for HYG stars, string for catalog designations such as deep-sky objects. */
id: number | string;
name: string;
/**
* What sort of thing this is — `STAR`, `PLANET`, `NEBULA`, `ARM`. Printed under the name in
* smaller, dimmer, wider-tracked capitals.
*
* A name on its own is ambiguous in a map that mixes scales: "Orion" is an arm, a nebula and a
* constellation, and at a glance nothing distinguishes the label on one from the label on
* another. The second line is what makes a label say what it is pointing at, not just what it
* is called.
*/
kind?: string;
x: number;
y: number;
z: number;
@@ -31,7 +41,13 @@ export class StarLabelOverlay {
this.cssRenderer.setSize(width, height);
}
/** Shows exactly these labels, adding/removing DOM elements only for a changed set. */
/**
* Shows exactly these labels, adding/removing DOM elements only for a changed set.
*
* A label that is already up is repositioned rather than left where it was: stars never move,
* but planets do, and a system's labels would otherwise stay pinned to wherever each body
* happened to be when its label first appeared.
*/
update(points: readonly LabeledPoint[]): void {
const idsToShow = new Set(points.map((point) => point.id));
@@ -42,7 +58,10 @@ export class StarLabelOverlay {
}
for (const point of points) {
if (!this.labelObjects.has(point.id)) {
const existing = this.labelObjects.get(point.id);
if (existing) {
existing.position.set(point.x, point.y, point.z);
} else {
this.addLabel(point);
}
}
@@ -62,8 +81,19 @@ export class StarLabelOverlay {
const element = document.createElement('div');
// Tailwind utility classes assigned directly since this element lives outside Angular's
// view encapsulation (see the class comment above) rather than through a component template.
element.className = 'translate-x-1.5 -translate-y-1.5 whitespace-nowrap font-body text-[11px] text-accent [text-shadow:0_0_4px_rgba(0,0,0,0.9)]';
element.textContent = point.name;
element.className = 'map-label translate-x-1.5 -translate-y-1.5 whitespace-nowrap font-body';
const name = document.createElement('span');
name.className = 'map-label-name';
name.textContent = point.name;
element.appendChild(name);
if (point.kind) {
const kind = document.createElement('span');
kind.className = 'map-label-kind';
kind.textContent = point.kind;
element.appendChild(kind);
}
const object = new CSS2DObject(element);
object.position.set(point.x, point.y, point.z);