From 69a052730f0f698015399227ebb2d4a8e92ac806 Mon Sep 17 00:00:00 2001 From: Senrokai Date: Wed, 30 Sep 2026 00:15:31 +0200 Subject: [PATCH] Test that the system view warms a host's planets by the luminosity the archive gives it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit d94451e passes the host's surface luminosity, the archive's st_lum where it has one, to the SystemOrbitsRenderer that classifies each planet, and no test looked at what the renderer got: the review's mutants that handed it the derived luminosity, none, or the Sun's all passed 807 of 807. Its commit says 544 planet temperatures move by more than 10 % and 98 planets change class with it. The scene spec now enters Proxima and checks that Proxima b's marker carries the texture of the appearance 0.00151 L☉ gives it (228 K, temperate), after checking that null and 1 L☉ each give another class, so that the texture can tell them apart. Controls: the renderer given starSurfaceOf(star, []).luminositySolar (the fixture has no measured band, so none), null, or 1 each fail it. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../galaxy-system-scene.component.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/app/features/galaxy-system/galaxy-system-scene.component.spec.ts b/src/app/features/galaxy-system/galaxy-system-scene.component.spec.ts index 58c7cd8..199a358 100644 --- a/src/app/features/galaxy-system/galaxy-system-scene.component.spec.ts +++ b/src/app/features/galaxy-system/galaxy-system-scene.component.spec.ts @@ -17,6 +17,8 @@ import { galacticNormal } from './grid-plane'; import { catalogueCensus, positionsNote } from './star-readouts'; import { closestApproachAu, SUN_RADIUS_AU } from './system-framing'; import { blackbodyColor, SOLAR_EFFECTIVE_TEMPERATURE_K } from '../../shared/astro/stellar'; +import { appearanceForExoplanet } from '../../shared/astro/body-appearance'; +import { planetTexture } from '../../shared/rendering/procedural-planet-texture'; import { JumpLinkRenderer } from './jump-link-renderer'; import { StarFieldRenderer } from './star-field-renderer'; import { LabeledPoint, StarLabelOverlay } from './star-label-overlay'; @@ -1014,6 +1016,17 @@ describe('GalaxySystemSceneComponent camera-flight transitions', () => { expect(scene.hudReadouts().find((readout) => readout.label === 'Radius')?.value).toBe('0.141 solar radii'); }); + it("warms a host's planets by the luminosity the archive gives it, in the system as on their own page", async () => { + const scene = await enter(PROXIMA); + const planet = (scene.systemRenderer as unknown as { members: { id: string; marker: THREE.Mesh }[] }).members.find((member) => member.id === PROXIMA_B.id)!; + // The archive's 1.51×10⁻³ L☉ puts b at 228 K, temperate. The fixture has no measured band, so + // without it b gets no temperature and another class, as it does in the Sun's light. + const warmed = appearanceForExoplanet(PROXIMA_B, 0.00151); + expect(warmed.planetClass).not.toBe(appearanceForExoplanet(PROXIMA_B, null).planetClass); + expect(warmed.planetClass).not.toBe(appearanceForExoplanet(PROXIMA_B, 1).planetClass); + expect((planet.marker.material as THREE.MeshStandardMaterial).map).toBe(planetTexture(warmed, { width: 128, height: 64 })); + }); + it('keeps the camera three radii out from a supergiant drawn at the radius its type and brightness give', async () => { const scene = await enter(ANTARES); const radius = scene.starMarkerGeometry.parameters.radius;