@johnmorrisdotca/wakusei-planets 0.37.1 → 0.37.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,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.37.2] - 2026-11-12
6
+
7
+ - **The freeze test of changes waits for a draw after each change** (MODULES-1172). "Changes give back what they took" read 37 GPU objects against 30 once on a loaded machine: it waited 400 ms after each body was picked, and a body is remade, and the one before it let go, only by a draw made with it. It now waits for the renderer to draw after each pick and after the Moons switch (dispatched: a real click scrolls the page, and a body scrolled out of sight is not drawn). 5 of 5 in the CI image; with a sphere leaked per body it reads 399 against 284 and fails.
8
+ - **A page with its own textureBase is not asked for pictures the package lacks** (MODULES-1175). The npm package ships each map at 512 and 1024; the 2048s are only in the repository. With `textureBase` and no `farBase`, the far base fell back to `textureBase`, so a body big in the view asked it for `<map>-2048.webp` (the Moon, Mars, Venus, the Sun and the rest) and got a 404. The painter now stops at the widest the package ships unless `farBase` says where the 2048s are; the default (jsDelivr) is unchanged. A test makes every painted body fill the screen under each setting and holds that `textureBase` is asked only for 512 and 1024, `farBase` for the 2048, and the default far base for it too; it fails on the old painter (the Sun's 2048 from the package's base). chikyu-earth can drop its stopgap (`maxTexture: 1024` in its demo).
9
+
5
10
  ## [0.37.1] - 2026-11-12
6
11
 
7
12
  - **The Earth's line look stays chikyu-earth's globe while it turns** (MODULES-1152). On a page with chikyu-earth's element, `<wakusei-body body="earth" look="line">` showed chikyu-earth's globe with the countries and then, at the next frame of its turn (the line look turns by default, 30 times a second), drew this package's own outline over it. A body that another package draws is now left to that package, and the line look's tick stops while it is shown; the same element made another body turns again. A browser test puts an Earth and a Mars in the line look on one page with chikyu-earth's element and counts what the page reports: the globe is never replaced while Mars is redrawn twenty times.
package/README.md CHANGED
@@ -19,7 +19,7 @@ Wakusei Planets runs in the browser of a phone, a tablet or a computer: nothing
19
19
 
20
20
  <p align="center"><img alt="The demo on a desk: Saturn in the painted look, turning in the big view, with the page's links to the portrait builder, the colouring sheets, the space view, the star page and the size line-up above it, and the choice of body and its moons below" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/main/docs/images/home-desk.webp" width="620"> <img alt="The same page on a phone: the same links in rows, and Saturn in the painted look below them" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/main/docs/images/home-phone.webp" width="200"></p>
21
21
 
22
- <p align="center"><img alt="Every body at one scale, the Earth among them: each small body has a magnified picture joined by a line, and the Sun shows only its edge" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.37.1/docs/images/lineup-desk.png" width="640"></p>
22
+ <p align="center"><img alt="Every body at one scale, the Earth among them: each small body has a magnified picture joined by a line, and the Sun shows only its edge" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.37.2/docs/images/lineup-desk.png" width="640"></p>
23
23
 
24
24
  ## Who it is for
25
25
 
@@ -387,7 +387,7 @@ The tiles of every body share one 48 MB budget, six loads at a time for a source
387
387
 
388
388
  ## The portrait builder
389
389
 
390
- <p align="center"><img alt="The Sun and the planets in an arc, painted, with their names, in the portrait builder" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.37.1/docs/images/portrait-family.png" width="640"></p>
390
+ <p align="center"><img alt="The Sun and the planets in an arc, painted, with their names, in the portrait builder" src="https://raw.githubusercontent.com/johnmorrisdotca/wakusei-planets/v0.37.2/docs/images/portrait-family.png" width="640"></p>
391
391
 
392
392
  [The portrait builder](https://johnmorrisdotca.github.io/wakusei-planets/portrait.html) puts any bodies in one picture: drag them, size them, turn them, order them front to back, arrange them in a row, an arc, a grid or at true orbit distance (true or readable sizes, a planet's moons round it in orbit order), light them from one direction, and take the code, a PNG or an SVG. The scene is kept in the address, and every body is drawn in one WebGL scene, so the page holds one WebGL context. [The portrait builder](docs/guides/portrait-builder.md) is its guide.
393
393
 
@@ -532,7 +532,7 @@ BODIES.pluto.kind; // "dwarf-planet"
532
532
 
533
533
  If this package helps a paper, a talk or a class, please cite it as software. GitHub's "Cite this repository" button reads [CITATION.cff](CITATION.cff) and gives BibTeX and APA; in plain text:
534
534
 
535
- > Morris, J. (2026). *Wakusei Planets* (version 0.37.1) [Computer software]. https://github.com/johnmorrisdotca/wakusei-planets
535
+ > Morris, J. (2026). *Wakusei Planets* (version 0.37.2) [Computer software]. https://github.com/johnmorrisdotca/wakusei-planets
536
536
 
537
537
  Cite the version you used (`npm ls @johnmorrisdotca/wakusei-planets`), and cite the sources of the numbers you use as well: [NOTICE.md](NOTICE.md) names each one, with the paper or the page it was read from (the IAU working group's report for sizes and poles, VSOP87B, ELP2000-82B, L1.2 and TASS1.7 for positions, and NASA's JPL Horizons for the fits and the spacecraft).
538
538
 
@@ -168,7 +168,8 @@ export interface MoonSite {
168
168
  radius: number;
169
169
  }
170
170
  /**
171
- * Where the pictures are, if not on jsDelivr: a folder address that ends in a slash. `farBase` holds the widest pictures (2048), which the npm package leaves out.
171
+ * Where the pictures are, if not on jsDelivr: a folder address that ends in a slash. `farBase` holds the widest pictures (2048), which the npm package leaves out. A page that gives its own
172
+ * `textureBase` (the package's `dist/textures/`, say) and no `farBase` is never asked for those: the painter stops at the widest the package ships (1024). Give `farBase` too when the 2048s are served.
172
173
  *
173
174
  * @example
174
175
  * ```ts no-run
@@ -232,7 +232,9 @@ function paint(T, id, context, bases) {
232
232
  glowMesh = glow;
233
233
  }
234
234
  // the painted map: the smallest width at once, a sharper one when the body is big on the screen, back to the small one when it is not
235
- const widths = (look.painted?.widths ?? []).filter((w, i) => i === 0 || w <= maxWidth);
235
+ // a width the far base holds (the sharpest, which the npm package leaves out) only when there is a far base: a page that gave its own textureBase and no farBase has only the package's widths
236
+ const farFrom = look.painted?.far;
237
+ const widths = (look.painted?.widths ?? []).filter((w, i) => i === 0 || (w <= maxWidth && (bases.far !== undefined || farFrom === undefined || w < farFrom)));
236
238
  let small;
237
239
  let sharp;
238
240
  let sharpWidth = 0;
@@ -240,7 +242,7 @@ function paint(T, id, context, bases) {
240
242
  let failed = false;
241
243
  let tooBigSince = 0;
242
244
  const tried = new Set();
243
- const urlOf = (w) => `${look.painted.far !== undefined && w >= look.painted.far ? bases.far : bases.near}${look.painted.map}-${w}.webp`;
245
+ const urlOf = (w) => `${look.painted.far !== undefined && w >= look.painted.far && bases.far !== undefined ? bases.far : bases.near}${look.painted.map}-${w}.webp`;
244
246
  const prepare = (t) => {
245
247
  t.anisotropy = 4;
246
248
  t.wrapS = T.RepeatWrapping;
@@ -464,7 +466,8 @@ function paint(T, id, context, bases) {
464
466
  */
465
467
  export function createPainter(options = {}) {
466
468
  const near = slash(options.textureBase ?? TEXTURE_BASE);
467
- const far = slash(options.farBase ?? (options.textureBase !== undefined ? options.textureBase : TEXTURE_FAR_BASE));
469
+ // the widest pictures are not in the npm package: a page with its own textureBase has them only where it says so with farBase (no far base, and the painter stops at the package's widths)
470
+ const far = options.farBase !== undefined ? slash(options.farBase) : options.textureBase !== undefined ? undefined : TEXTURE_FAR_BASE;
468
471
  const own = options.tiles;
469
472
  const tiles = own === "off" || own === "none" || own === "" ? undefined : own !== undefined ? slash(own) : options.textureBase !== undefined ? undefined : TILES_BASE;
470
473
  const book = options.book ?? createSourceBook({ kinds: ["tiles"] });
@@ -11,7 +11,7 @@ import { type BodyMapSource } from "../door/map.ts";
11
11
  * console.log(TEXTURE_BASE);
12
12
  * ```
13
13
  */
14
- export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.37.1/dist/textures/";
14
+ export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.37.2/dist/textures/";
15
15
  /**
16
16
  * Where the sharpest surface pictures are: the files of this exact version in the repository, on jsDelivr's GitHub address. The npm package holds only the two smaller widths, so a page that
17
17
  * never zooms in never fetches them. Set `texture-far-base` on an element to serve them yourself.
@@ -23,7 +23,7 @@ export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdot
23
23
  * console.log(TEXTURE_FAR_BASE);
24
24
  * ```
25
25
  */
26
- export declare const TEXTURE_FAR_BASE = "https://cdn.jsdelivr.net/gh/johnmorrisdotca/wakusei-planets@v0.37.1/textures/";
26
+ export declare const TEXTURE_FAR_BASE = "https://cdn.jsdelivr.net/gh/johnmorrisdotca/wakusei-planets@v0.37.2/textures/";
27
27
  /**
28
28
  * Where the finer map tiles are by default: the demo site's `tiles/` folder (GitHub Pages sends `access-control-allow-origin: *`). The tiles are made by `scripts/make-body-tiles.py` and are in no package and no repository:
29
29
  * a page that serves its own gives the folder in the `tiles` attribute, and `tiles="off"` turns them off. A page that sets `texture-base` (it serves its own pictures) has none unless it says where they are.
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.37.1";
1
+ export declare const VERSION = "0.37.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.37.1";
1
+ export const VERSION = "0.37.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnmorrisdotca/wakusei-planets",
3
- "version": "0.37.1",
3
+ "version": "0.37.2",
4
4
  "description": "Wakusei Planets 惑星 — The Sun, planets and moons for the web: each as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, axial tilt and rotation as data, and positions of the moons for any date and time. SVG for the lines, three.js (optional) for the rest.",
5
5
  "keywords": [
6
6
  "planets",