Owner decision 2026-10-06: the globe tells its numbers where they belong instead of in a table. instruments.js adds one three.js group to globe.gl's scene and a DOM overlay of chips: - the Sun: a ray and a bead over the subsolar point (with the irradiance), the day/night line, the golden hour and the three twilights, the declination, the noon and midnight meridian, and the analemma at this hour, its stretch to the next equinox or solstice brighter; - a focused post's place: its horizon, its Sun's line and height, and its day lit on its latitude, with one chip for the place, the phase, the solar time, the elevation and the day's length; - the tropics and polar circles (the axial tilt), the CDN ring, the view's centre and spread, and rings around the posts in view; - a small orrery in the top left corner, re-anchored to the camera before each render, with the Earth–Sun distance, the seasons, the next equinox or solstice and the next perihelion or aphelion stacked under it; - the frame rate as a ring around the globe; the rest (points, textures, countries, renderer) as a legend. The chips are placed after each frame globe.gl draws, clear of each other, the moment's caption, the orrery and the legend, and slide back inside the canvas at its edge; country names keep clear of them. Geometry changes only inside a wake globe.js already made, so an idle globe still draws nothing. three.js's classes come from globe.gl's own objects, looked for before each render until its globe is in the scene. A phone's banner draws the day/night line and the subsolar point; full screen draws everything, and a globe built in the banner now moves its camera back when opened full screen. GlobePanel loses both tooltips and the one-second poll that read every post into a table; the Sun's rows stay as screen-reader text, and a failed start says so. Seven keys only the tooltips used are gone. GlobeTests (desktop with a located post written from Milano and pinned, in both themes and turned to the subsolar point; a phone's banner, full screen and back; an idle globe drawing no frame) pass. Under SwiftShader the instruments cost 1–3 ms of a ~50 ms frame and under 0.1 ms of script; FeedPerfTests' heaps are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
41 lines
3.7 KiB
Markdown
41 lines
3.7 KiB
Markdown
# The globe's vendored files
|
||
|
||
Copied once on 2026-10-04 from the npm registry (registry.npmjs.org) and, for the day texture, from NASA
|
||
(eoimages.gsfc.nasa.gov); the build and the app never fetch them from anywhere else. To update, download the new files,
|
||
copy them the same way (the day texture through `tools/globe/prepare-day-texture.py`, the countries through
|
||
`tools/globe/prepare-countries.py`), and replace the hashes.
|
||
|
||
NASA's mosaic does not wrap cleanly at the 180° meridian near the poles (a lighter strip at its east edge), which the
|
||
globe, drawing each pixel at its exact place, shows as a line from each pole; the script blends that strip into the
|
||
map on both sides, only on rows where the two sides agree, and gives the rows within half a degree of each pole one
|
||
colour.
|
||
|
||
| File | From | Licence | sha256 |
|
||
|---|---|---|---|
|
||
| `globe.gl.min.js` | `globe.gl` 2.46.2, `dist/globe.gl.min.js` (UMD, defines `window.Globe`) | MIT, `LICENSE-globe.gl` | `2c3e445c04d121215910a89688b96091c8a72071c122a4f830081a39b636c94c` |
|
||
| `earth-blue-marble.jpg` | NASA Visible Earth, Blue Marble Next Generation with topography and bathymetry, December 2004 (`world.topo.bathy.200412.3x5400x2700.jpg`, sha256 `a9f0088972dee0254610af851c4d6838ca3f2cf79176987e0a5713e2c15ec042`), seam repaired and scaled to 4096×2048 by `tools/globe/prepare-day-texture.py` | NASA, public domain | `1334612d91d5104afb0e48cce916e100575c2969baf99e21454c23535f4ce713` |
|
||
| `earth-night.jpg` | `three-globe` 2.45.3, `example/img/earth-night.jpg`, 4096×2048 | NASA Earth Observatory "Black Marble" (city lights), public domain | `355ab23dd1323315b393d7b91dd2d7ee223a1cbaaba2b48dc72ba90d371ced24` |
|
||
| `countries.json` | `world-atlas` 2.0.2 (tarball sha256 `032e7765f2ce00edaeafec23ff22bc3b77e42987c257da944cc585b452c05b97`), `countries-50m.json` (sha256 `04342cdc1e3016bcd7db1630de95684d67b79fe3c8c460321e87aef469502394`): land borders and name positions, by `tools/globe/prepare-countries.py`; two-letter codes from Debian's `iso-codes` 4.20.1 (`iso_3166-1.json`, LGPL-2.1, only the code mapping is used) | Natural Earth 1:50m, public domain; `world-atlas` ISC, `LICENSE-world-atlas` | `5194ad47c539b4c89826a48616ddbef2b2d2fbd2ca9a368dd6d2bced81e0d74f` |
|
||
|
||
`globe.gl.min.js` bundles its dependencies: three.js r185 (MIT, © 2010–2026 three.js authors), three-globe (MIT, © 2019
|
||
Vasco Asturiano), @tweenjs/tween.js (MIT), kapsule and accessor-fn (MIT, © Vasco Asturiano), and d3 modules (ISC, ©
|
||
Mike Bostock). Their notices are in `LICENSES-bundled.txt`.
|
||
|
||
Country names are not in `countries.json` beyond Natural Earth's English ones: the globe asks the browser
|
||
(`Intl.DisplayNames`) for each two-letter code in the reader's language, and falls back to the English name for the
|
||
few areas without a code (Kosovo, Somaliland, Northern Cyprus, …).
|
||
|
||
The service worker leaves this folder out of the offline precache (`service-worker.published.js`): the feed page
|
||
loads it the first time it shows the globe.
|
||
|
||
**Before upgrading globe.gl**, check what the app relies on inside the bundle, since it never sees `window.THREE`:
|
||
- **`wwwroot/js/instruments.js`** takes three.js's classes from objects globe.gl made (`classesOf`):
|
||
- the globe mesh, whose material is `globeMaterial()`, inside a `Group`;
|
||
- the graticules, a `LineSegments` with a `LineBasicMaterial`, added hidden;
|
||
- an empty `Mesh`, for `BufferGeometry` and `MeshBasicMaterial`;
|
||
- the camera's `Vector3`.
|
||
|
||
It also relies on the scene's `onBeforeRender` and `onAfterRender` running on every frame. If any of these change,
|
||
the instruments fall back to the ring and the legend, and the e2e `GlobeTests` fail on `built`.
|
||
- **`wwwroot/js/globe.js`** relies on the texture class of the day map and on the globe material's shader chunks.
|