@johnmorrisdotca/chikyu-earth 0.60.0 → 0.60.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 0.60.1 - 2026-11-17
6
+
7
+ - **The Earth's edge is round from a low orbit** (MODULES-1498). In the space view the clouds were drawn on a shell 38 km above the ground, so wherever there was cloud at the Earth's edge the outline stood up from it: from 640 km a lump more than half a degree tall, several pixels in a ride. The shell is now about 10 km up while the camera is within 60 Earth radii (`cloudShell`, `src/space/cloud-shell.ts`), still above the finer map tiles, and the old height only from further away, where the difference is under half a pixel.
8
+
3
9
  ## 0.60.0 - 2026-11-17
4
10
 
5
11
  - **`classOfElements` and `orbitClass` follow the Space Program X site's orbit levels** (MODULES-1403; breaking for code that reads the class names). The class is now decided by the rule the site's `levelOf` uses, so a page that shows both says one thing: low is a highest point under 2,000 km; geostationary is both points within 2,500 km (was 1,500) of 35,786 km; the outer edge of low orbit (`outer`, new) is a lowest point of 2,000 km or more and a highest under 8,000 km; medium is the rest of those to 32,000 km (was 34,286); `far` is every orbit left. There is no rule on the eccentricity any more (`heo` is gone: an oval low orbit is low, and the stretched ones that swing far out are `far`), and `other` is gone (`far` takes what was left). `OrbitClass` is `"leo" | "outer" | "meo" | "geo" | "far"`, `ORBIT_CLASSES`, `CLASS_LABELS` (English and Japanese, the site's words) and `CLASS_COLOURS` follow, and `CLASS_LIMITS` is `{ leoApogeeKm, outerApogeeKm, meoApogeeKm, geoBandKm }`. Heights stay above the mean Earth radius (6,371 km), 7 km under the site's equatorial radius, so a set within 7 km of a limit can differ. On the site's own 16,903 element sets 53 had a different class under the old rule. The satellites' class colours on the Earth follow.
package/README.md CHANGED
@@ -615,7 +615,7 @@ console.log(countryList().filter((country) => country.alpha2 === null).map((coun
615
615
 
616
616
  ## How to cite
617
617
 
618
- > Morris, J. (2026). *Chikyu Earth* (version 0.60.0) [Computer software]. https://github.com/johnmorrisdotca/chikyu-earth
618
+ > Morris, J. (2026). *Chikyu Earth* (version 0.60.1) [Computer software]. https://github.com/johnmorrisdotca/chikyu-earth
619
619
 
620
620
  GitHub's "Cite this repository" button reads [CITATION.cff](CITATION.cff) and gives BibTeX and APA. Cite the version you used (`npm ls @johnmorrisdotca/chikyu-earth`), and credit the sources behind the numbers and pictures: [NOTICE.md](NOTICE.md) says who made each one and under what terms.
621
621
 
@@ -0,0 +1,13 @@
1
+ /** The shell's radius while the camera is near (the Earth's radius is 1): about 10 km up, above the finer map tiles' own shells (1.0008 at most) by more than the shell's flat faces dip. */
2
+ export declare const CLOUD_SHELL_NEAR = 1.0016;
3
+ /** The shell's radius from far away, where a low shell could fight the ground for the same depth and the change is under half a pixel. */
4
+ export declare const CLOUD_SHELL_FAR = 1.006;
5
+ /** The camera's distance from the Earth's middle, in Earth radii, past which the far shell is used. */
6
+ export declare const CLOUD_SHELL_REACH = 60;
7
+ /**
8
+ * The radius of the clouds' shell for a camera this far from the Earth's middle. A shell 38 km up (the far one) stands above the ground at the Earth's edge wherever there is cloud, so from a
9
+ * low orbit the outline had lumps several pixels tall; near the Earth the shell is as low as the map tiles under it allow.
10
+ * @param distance - The camera's distance from the Earth's middle, in Earth radii.
11
+ * @returns The shell's radius, in Earth radii.
12
+ */
13
+ export declare function cloudShell(distance: number): number;
@@ -0,0 +1,16 @@
1
+ // How high the clouds' shell sits above the ground in the space view.
2
+ /** The shell's radius while the camera is near (the Earth's radius is 1): about 10 km up, above the finer map tiles' own shells (1.0008 at most) by more than the shell's flat faces dip. */
3
+ export const CLOUD_SHELL_NEAR = 1.0016;
4
+ /** The shell's radius from far away, where a low shell could fight the ground for the same depth and the change is under half a pixel. */
5
+ export const CLOUD_SHELL_FAR = 1.006;
6
+ /** The camera's distance from the Earth's middle, in Earth radii, past which the far shell is used. */
7
+ export const CLOUD_SHELL_REACH = 60;
8
+ /**
9
+ * The radius of the clouds' shell for a camera this far from the Earth's middle. A shell 38 km up (the far one) stands above the ground at the Earth's edge wherever there is cloud, so from a
10
+ * low orbit the outline had lumps several pixels tall; near the Earth the shell is as low as the map tiles under it allow.
11
+ * @param distance - The camera's distance from the Earth's middle, in Earth radii.
12
+ * @returns The shell's radius, in Earth radii.
13
+ */
14
+ export function cloudShell(distance) {
15
+ return distance < CLOUD_SHELL_REACH ? CLOUD_SHELL_NEAR : CLOUD_SHELL_FAR;
16
+ }
@@ -1,4 +1,5 @@
1
1
  import { AIR_QUALITY, AIR_THICKNESS_DEFAULT, AIR_VERT, airFrag, airTop } from "../realistic/air.js";
2
+ import { CLOUD_SHELL_NEAR, cloudShell } from "./cloud-shell.js";
2
3
  import { sphere } from "../realistic/earth.js";
3
4
  import { BODY_FRAG, CLOUD_FRAG, GLOW_FRAG, GLOW_VERT, SURFACE_FRAG, SURFACE_VERT } from "../realistic/shaders.js";
4
5
  import { createTextureSet } from "../realistic/textures.js";
@@ -292,7 +293,7 @@ export function createSpaceItem(model, deps) {
292
293
  const tiles = createTileSet(three, earth, { sunDir: sunEarth, lights: earthMaterial.uniforms["lights"], boost: earthMaterial.uniforms["boost"], ortho: earthMaterial.uniforms["ortho"], water: uniform.water, night: uniform.night, extra: { cloudMap: uniform.clouds, sunLocal, cloudShift } }, { assets: deps.assets, sources: () => deps.sources?.() ?? {}, cap: deps.cap, invalidate: arrivalDraw, ...(deps.onTiles ? { onManifest: deps.onTiles } : {}) });
293
294
  model.tiles = tiles;
294
295
  const clouds = new three.Mesh(grid, cloudMaterial);
295
- clouds.scale.setScalar(1.006);
296
+ clouds.scale.setScalar(CLOUD_SHELL_NEAR);
296
297
  clouds.renderOrder = 3;
297
298
  const glow = new three.Mesh(grid, atmosphereMaterial);
298
299
  glow.scale.setScalar(airTop(model.airThickness));
@@ -479,6 +480,7 @@ export function createSpaceItem(model, deps) {
479
480
  cloudShift.value = -(((model.time / 3_600_000) * model.cloudDrift) % 360) / 360;
480
481
  atmosphereMaterial.uniforms["thick"].value = model.airThickness;
481
482
  glow.scale.setScalar(airTop(model.airThickness));
483
+ clouds.scale.setScalar(cloudShell(camera.position.length())); // where the camera was at the last draw: the two shells differ by under a pixel where they change
482
484
  const fade = stepLightFade(model.lightFade, model.light === "lit", performance.now(), prefersLessMotion());
483
485
  // one more frame while it moves, and none once it has arrived
484
486
  if (fade.fading)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnmorrisdotca/chikyu-earth",
3
- "version": "0.60.0",
3
+ "version": "0.60.1",
4
4
  "description": "Chikyu Earth 地球 — A line-drawn globe for the web: country outlines that turn at the Earth's own rate, centred on the place you give it, with an optional realistic Earth from space (three.js), the Sun, Moon and planets, satellites on their orbits, and markers for any place. A web component and an SVG string.",
5
5
  "keywords": [
6
6
  "earth",