Files
gods-eye-view/mobile/vision/prep-textures.mjs
T
Claude 3218b7d427 feat(mobile): add the untethered vision mockup and document the mobile app
mobile/vision/index.html is a single self-contained file: a hand-written
WebGL2 planet with real sun position, Black Marble lights, atmosphere,
clouds and a mobile post chain; the full feed, card-to-world morph, Ride,
lenses and time ribbon over synthetic traffic; capture with real
WebCrypto seals; and reconstruction threads with a verifiable ledger and
an AI refine composer. All data is illustrative and marked as such.
build.mjs regenerates it offline from src/ and assets/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VVYRAqiQj9Y1V9ZfG1RcDH
2026-10-18 06:16:11 +00:00

26 lines
1.7 KiB
JavaScript

// One-time texture prep: NASA public-domain sources -> small WebP files in ./assets.
// Usage: node mobile/vision/prep-textures.mjs <dir-with-downloads>
// Sources (public domain, NASA): Blue Marble NG (cloudless day), Black Marble 2016 (night lights,
// https://eoimages.gsfc.nasa.gov/images/imagerecords/144000/144898/BlackMarble_2016_3km.jpg),
// Blue Marble clouds, land/water mask and topography ([email protected] example images).
import { createRequire } from 'node:module';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const require = createRequire(import.meta.url);
const sharp = require('sharp');
const here = path.dirname(fileURLToPath(import.meta.url));
const src = process.argv[2];
if (!src) { console.error('usage: node prep-textures.mjs <download-dir>'); process.exit(1); }
const out = (f) => path.join(here, 'assets', f);
const jobs = [
['earth-blue-marble.jpg', 'day.webp', (s) => s.resize(4096, 2048).webp({ quality: 84, smartSubsample: true, effort: 6 })],
['BlackMarble_2016_3km.jpg', 'night.webp', (s) => s.resize(4096, 2048, { kernel: 'lanczos3' }).webp({ quality: 80, smartSubsample: true, effort: 6 })],
['clouds.png', 'clouds.webp', (s) => s.resize(2048, 1024).extractChannel('alpha').webp({ quality: 66, effort: 6 })],
['earth-water.png', 'water.webp', (s) => s.resize(2048, 1024).greyscale().webp({ quality: 60, effort: 6 })],
['earth-topology.png', 'topo.webp', (s) => s.resize(2048, 1024).greyscale().webp({ quality: 74, effort: 6 })],
];
for (const [i, o, fn] of jobs) {
const info = await fn(sharp(path.join(src, i))).toFile(out(o));
console.log(o, info.width + 'x' + info.height, (info.size / 1024).toFixed(0) + ' KB');
}