diff --git a/src/app/shared/rendering/body-orientation.ts b/src/app/shared/rendering/body-orientation.ts index ccf270e..42dd4c8 100644 --- a/src/app/shared/rendering/body-orientation.ts +++ b/src/app/shared/rendering/body-orientation.ts @@ -19,7 +19,9 @@ const Z_AXIS = new THREE.Vector3(0, 0, 1); * Greenwich is in the middle of Earth's; on Mars's, Olympus Mons (226.2 E, which is -133.8) sits a * little over a third of the width left of centre; on the Moon's, Mare Crisium (59 E) is right of * centre and Mare Orientale (95 W) left of it; on Mercury's, the rayed crater Kuiper (31.5 W, 11 S) - * is just left of centre and below the equator. A map labelled in west longitude, as most planets' + * is just left of centre and below the equator; on Venus's, Maxwell Montes (65.2 N, 3.3 E) is the + * brightest spot, high and just right of centre — Solar System Scope ships that map turned half + * round, south up, and it is kept turned back. A map labelled in west longitude, as most planets' * are, is still drawn with east to the right, as any map of a sphere seen from outside is; only its * numbers run the other way. So longitude 0 is +X and 90 E is -Z, and a quarter turn about X * carries that onto the IAU's body-fixed frame: pole +Z, prime meridian +X, 90 E +Y. diff --git a/src/app/shared/rendering/texture-catalog.spec.ts b/src/app/shared/rendering/texture-catalog.spec.ts index 465dde8..effbebf 100644 --- a/src/app/shared/rendering/texture-catalog.spec.ts +++ b/src/app/shared/rendering/texture-catalog.spec.ts @@ -1,3 +1,7 @@ +/// +// Node, for the one test that reads a map's bytes from disk. +import { createHash } from 'node:crypto'; +import { readFileSync } from 'node:fs'; import * as THREE from 'three/webgpu'; import { describe, expect, it } from 'vitest'; @@ -11,6 +15,16 @@ describe('bodyTexturePath', () => { } }); + it('wraps Venus in the map turned north up, the one checked for Maxwell Montes', () => { + // As the Solar System Scope pack ships it, venus.jpg is the Magellan map turned half round: + // Maxwell Montes, 65.2 N 3.3 E in the IAU Gazetteer, was its brightest point at 63 S 9 W. The + // file turned back puts it at 63.7 N 8.3 E; see assets/textures/README.md. No decoder runs + // here, so the check is pinned to those bytes. + expect(bodyTexturePath('venus')).toBe('assets/textures/bodies/venus.jpg'); + const bytes = readFileSync(`${process.cwd()}/src/assets/textures/bodies/venus.jpg`); + expect(createHash('sha256').update(bytes).digest('hex')).toBe('4528b8e9a3cf880d80e8a5321a3001e8792bc18f266c06f3456a6bd8475e021d'); + }); + it('leaves the bodies with no map it could check to their derived surface', () => { for (const id of ['miranda', 'ariel', 'umbriel', 'titania', 'oberon', 'hyperion', 'eris']) { expect(bodyTexturePath(id)).toBeUndefined(); diff --git a/src/assets/textures/README.md b/src/assets/textures/README.md index 61385a0..cdfeed7 100644 --- a/src/assets/textures/README.md +++ b/src/assets/textures/README.md @@ -12,6 +12,13 @@ prime meridian (W) then turns longitude 0 to where it belongs at any date. and the skybox come from the Solar System Scope texture pack, and `jupiter` from its 8k pack, via Wikimedia Commons. See each file's Commons page for the original credit line. +`venus.jpg` is kept turned 180 degrees from the pack's file, which is the Magellan radar map with +south up and east to the left: there Maxwell Montes (65.2 N, 3.3 E in the IAU Gazetteer), the +brightest feature north or south of 50 degrees, sat at 63 S, 9 W, with Lakshmi Planum east of it +instead of west. Turned back (PIL `ROTATE_180`, re-saved on the file's own quantisation tables, 0.03 +grey levels from the exact turn), its brightest point is at 63.7 N, 8.3 E, with Lakshmi to the west. +`texture-catalog.spec.ts` pins the checked file's SHA-256. + `saturn_ring.png` is a 1 280 by 78 px strip. Its x axis runs straight out from Saturn: read off its alpha, the C ring's inner edge (74 490 km) is at px 91, the B ring's inner and outer edges (92 000 and 117 580 km) at 404.5 and 860, the A ring's outer edge (136 775 km) at 1 204 and the F ring diff --git a/src/assets/textures/bodies/venus.jpg b/src/assets/textures/bodies/venus.jpg index 48f8f15..b7d3933 100644 Binary files a/src/assets/textures/bodies/venus.jpg and b/src/assets/textures/bodies/venus.jpg differ