@johnmorrisdotca/chikyu-earth 0.60.1 → 0.60.2

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
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.60.2 - 2026-11-17
6
+
7
+ - **The realistic look's clouds no longer stand up from the Earth's edge** (MODULES-1498). Its clouds sat on the 38 km shell (radius 1.006) that made lumps on the outline in the space view: 0.006 of the globe's radius in pixels, 12 pixels on a 4096 pixel canvas. They now use the space view's near shell (1.0016, about 10 km up, `CLOUD_SHELL_NEAR`), which stays above the finer map tiles' shells (1.0008) by more than a face of the sphere dips. The realistic picture is orthographic, so there is no distance to switch by and no far shell is needed: its depth is linear and the low shell does not fight the ground. A test holds the radius, the clearance and the size of the lump.
8
+
5
9
  ## 0.60.1 - 2026-11-17
6
10
 
7
11
  - **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.
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.1) [Computer software]. https://github.com/johnmorrisdotca/chikyu-earth
618
+ > Morris, J. (2026). *Chikyu Earth* (version 0.60.2) [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
 
@@ -29,6 +29,14 @@ type Three = ThreeParts;
29
29
  * ```
30
30
  */
31
31
  export declare const ATMOSPHERE_OUTER = 1.08;
32
+ /**
33
+ * The radius of the clouds' shell in the realistic look (the Earth's radius is 1): the space view's near shell, about 10 km up. A shell 38 km up (1.006) stood above the ground at the Earth's edge wherever there
34
+ * was cloud, a lump of 0.006 of the globe's radius in pixels (12 pixels on a 4096 pixel canvas). The picture is orthographic, so there is no distance to switch by, and the depth is linear (1 to 120 over 24 bits),
35
+ * so the low shell never fights the ground; it stays above the finer map tiles' own shells (1.0008 at most) by more than a face of the sphere dips (`GRID_COLUMNS`).
36
+ */
37
+ export declare const CLOUD_RADIUS = 1.0016;
38
+ /** The columns of the sphere the Earth, its clouds and its air are drawn on. */
39
+ export declare const GRID_COLUMNS = 128;
32
40
  /** What the scene reads at each draw; the element changes it and asks for a draw. */
33
41
  /**
34
42
  * How the Earth is lit: `sun` (the true light, with the night side dark and the city lights on it), `lit` (always lit, as if by daylight from the camera's side, the day picture and no city lights: the night side is never a black frame)
@@ -11,6 +11,7 @@ import { createBodyLabelLayer, newBodyLabelState } from "./body-label.js";
11
11
  import { beginPlaceSprites, createPlaceSprites } from "../markers/place-sprites.js";
12
12
  import { createMeteorLayer, newMeteorState } from "../meteors/layer.js";
13
13
  import { createBorderLayer, newBorderState } from "../borders/layer.js";
14
+ import { CLOUD_SHELL_NEAR } from "../space/cloud-shell.js";
14
15
  import { createGridLayer, newGridState } from "../grid/layer.js";
15
16
  import { createRouteLayer, newRouteState } from "../route/layer.js";
16
17
  import { pointOnEarth } from "./tiles.js";
@@ -28,7 +29,14 @@ const RAD = Math.PI / 180;
28
29
  * ```
29
30
  */
30
31
  export const ATMOSPHERE_OUTER = 1.08;
31
- const CLOUD_RADIUS = 1.006;
32
+ /**
33
+ * The radius of the clouds' shell in the realistic look (the Earth's radius is 1): the space view's near shell, about 10 km up. A shell 38 km up (1.006) stood above the ground at the Earth's edge wherever there
34
+ * was cloud, a lump of 0.006 of the globe's radius in pixels (12 pixels on a 4096 pixel canvas). The picture is orthographic, so there is no distance to switch by, and the depth is linear (1 to 120 over 24 bits),
35
+ * so the low shell never fights the ground; it stays above the finer map tiles' own shells (1.0008 at most) by more than a face of the sphere dips (`GRID_COLUMNS`).
36
+ */
37
+ export const CLOUD_RADIUS = CLOUD_SHELL_NEAR;
38
+ /** The columns of the sphere the Earth, its clouds and its air are drawn on. */
39
+ export const GRID_COLUMNS = 128;
32
40
  const LAYERS = ["day", "night", "clouds", "water"];
33
41
  export const newModel = () => ({
34
42
  centre: { lon: 0, lat: 0 },
@@ -152,7 +160,7 @@ export function createEarthItem(model, deps) {
152
160
  /** The Sun in the Earth's own axes (before the view turns it), which the surface needs to find where a cloud's shadow falls. */
153
161
  const sunLocal = { value: new three.Vector3(1, 0, 0) };
154
162
  const cloudShift = { value: 0 };
155
- const grid = sphere(three, 128, 64);
163
+ const grid = sphere(three, GRID_COLUMNS, 64);
156
164
  const surface = new three.ShaderMaterial({
157
165
  vertexShader: SURFACE_VERT,
158
166
  fragmentShader: SURFACE_FRAG,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnmorrisdotca/chikyu-earth",
3
- "version": "0.60.1",
3
+ "version": "0.60.2",
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",