Guide for finding and modifying star visuals, star types, star colors, star rendering, and star data in The Years Between the Stars. Use this skill whenever the user wants to change how stars look, add a new star type, tweak star colors or sizes, modify the starfield background, change star glow effects, or adjust how stars appear in the cluster map or system view. Trigger on phrases like "change star color", "add a star type", "stars look wrong", "starfield", "star glow", "make the sun look different".
Current star types (defined as string literals): G, K, M, F, A, WD (white dwarf), NS (neutron star), PU (pulsar), XB (X-ray binary), MG (magnetar), BH (black hole), XBB (X-ray burster), SGR (soft gamma repeater), IRON (iron star)
src/game/constants.ts — STAR_COLORS and STAR_TYPE_DISPLAY lookup tables. This is the TypeScript source of truth for star colors and display names. Edit here for quick color changes without touching Rust.
engine/src/system_generator.rs — Rust-side star data:
star_color() — returns an RGB hex color per star typestar_radius_range() — returns (min, max) radius for each typeIf the Rust colors diverge from constants.ts, the Rust values control what gets serialized into SystemData.
src/game/rendering/meshFactory.ts — primary rendering file for stars:
makeGlowSprite() — creates the glowing star sprite seen when flying in a systemSystemData fieldssrc/game/rendering/SceneRenderer.ts — places the star in the scene, sets up the point light that illuminates planets. Edit here to:
src/game/rendering/effects.ts — createStarfield() generates the background particle field of distant stars. Edit here to:
src/ui/ClusterMap/ClusterMap.tsx — renders stars as colored dots on the galaxy map. Uses STAR_COLORS from constants.ts. Edit here to change star dot size, color, selection highlight, or label appearance.
src/ui/HUD/HUD.tsx — displays the current star type and name in the HUD. Edit here for display-name changes.
engine/src/cluster_generator.rs — assigns star types when generating the 30-star cluster. Star type probabilities/weights live here. Edit to change how common each star type is.
Change a star's color:
src/game/constants.ts — update STAR_COLORS[type]engine/src/system_generator.rs — update star_color() to match (keep in sync)npm run wasm:build (or cd engine && wasm-pack build --target web --out-dir pkg)Change star glow appearance:
src/game/rendering/meshFactory.ts — find makeGlowSprite()Change starfield density/look:
src/game/rendering/effects.ts — find createStarfield()Add a new star type:
engine/src/system_generator.rs — add to star_color() and star_radius_range()engine/src/cluster_generator.rs — add to generation weightssrc/game/constants.ts — add to STAR_COLORS and STAR_TYPE_DISPLAYChange star size:
engine/src/system_generator.rs — update star_radius_range() for the type