@johnmorrisdotca/wakusei-planets 0.44.1 → 0.44.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.44.2] - 2026-11-13
6
+
7
+ - **The best-known names come first** (MODULES-1231). Six names on a phone's Moon were six seas. Each body now has a hand-ranked head ahead of the rule of fame and size (`placeRank`): on the Moon the four great seas, Tycho and Copernicus; on Mars Olympus Mons, Valles Marineris, Hellas, the Tharsis volcanoes (Arsia, Ascraeus, Pavonis) and Gale. The cap and the placement are as in 0.44.1.
8
+
5
9
  ## [0.44.1] - 2026-11-13
6
10
 
7
11
  - **Few names on a small body** (MODULES-1231). On a phone the Moon at 49 px of radius had five names laid across it, wider than the disc. A name is now written only from 70 px of radius (`MARK_RULES.nameFromPx`), comes in over the next 20 px, at most one to every 20 px of radius, and never wider than the disc.
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.44.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.44.2/docs/images/lineup-desk.png" width="640"></p>
23
23
 
24
24
  ## Who it is for
25
25
 
@@ -388,7 +388,7 @@ The tiles of every body share one 48 MB budget, six loads at a time for a source
388
388
 
389
389
  ## The portrait builder
390
390
 
391
- <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.44.1/docs/images/portrait-family.png" width="640"></p>
391
+ <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.44.2/docs/images/portrait-family.png" width="640"></p>
392
392
 
393
393
  [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.
394
394
 
@@ -534,7 +534,7 @@ BODIES.pluto.kind; // "dwarf-planet"
534
534
 
535
535
  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:
536
536
 
537
- > Morris, J. (2026). *Wakusei Planets* (version 0.44.1) [Computer software]. https://github.com/johnmorrisdotca/wakusei-planets
537
+ > Morris, J. (2026). *Wakusei Planets* (version 0.44.2) [Computer software]. https://github.com/johnmorrisdotca/wakusei-planets
538
538
 
539
539
  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).
540
540
 
@@ -196,7 +196,7 @@ export interface Obstacle {
196
196
  id?: string;
197
197
  }
198
198
  /**
199
- * How important a place is for a name on the surface. Lower is more important. Fame comes first: a famous place ranks ahead of every place that is not. Within each group a larger feature ranks ahead of a smaller one (its diameter in kilometres is taken off the rank). A place with no size ranks last in its group.
199
+ * How important a place is for a name on the surface. Lower is more important. A body's hand-ranked head comes first (on the Moon the four great seas, Tycho and Copernicus; on Mars Olympus Mons, Valles Marineris, Hellas, the Tharsis volcanoes and Gale). Then fame: a famous place ranks ahead of every place that is not. Within each group a larger feature ranks ahead of a smaller one (its diameter in kilometres is taken off the rank). A place with no size ranks last in its group.
200
200
  *
201
201
  * @param place - One place.
202
202
  * @returns The rank.
@@ -197,7 +197,7 @@ export function placeMarks(places, layers, view, radiusKm, options) {
197
197
  const nameBox = (text) => ({ halfWidth: Math.ceil(text.length * 3.7) + 5, halfHeight: 9 });
198
198
  const touches = (a, b) => Math.abs(a.x - b.x) < a.halfWidth + b.halfWidth && Math.abs(a.y - b.y) < a.halfHeight + b.halfHeight;
199
199
  /**
200
- * How important a place is for a name on the surface. Lower is more important. Fame comes first: a famous place ranks ahead of every place that is not. Within each group a larger feature ranks ahead of a smaller one (its diameter in kilometres is taken off the rank). A place with no size ranks last in its group.
200
+ * How important a place is for a name on the surface. Lower is more important. A body's hand-ranked head comes first (on the Moon the four great seas, Tycho and Copernicus; on Mars Olympus Mons, Valles Marineris, Hellas, the Tharsis volcanoes and Gale). Then fame: a famous place ranks ahead of every place that is not. Within each group a larger feature ranks ahead of a smaller one (its diameter in kilometres is taken off the rank). A place with no size ranks last in its group.
201
201
  *
202
202
  * @param place - One place.
203
203
  * @returns The rank.
@@ -213,9 +213,19 @@ const touches = (a, b) => Math.abs(a.x - b.x) < a.halfWidth + b.halfWidth && Mat
213
213
  * ```
214
214
  */
215
215
  export function placeRank(place) {
216
+ // a hand-ranked head for a body: the places every reader knows come first, in this order (the largest seas with the two best-known craters on the Moon; the great volcanoes and canyon on Mars)
217
+ const head = NAME_HEAD[place.id.slice(0, place.id.indexOf("/"))];
218
+ const at = head === undefined ? -1 : head.indexOf(place.id);
219
+ if (at >= 0)
220
+ return -2_000_000 + at;
216
221
  const size = Math.min(1_000_000, place.feature?.diameterKm ?? 0);
217
222
  return (place.famous === true ? 0 : 1_000_000) - size;
218
223
  }
224
+ /** The first names of a body, in order, ahead of the rule of fame and size: what a reader would name first. */
225
+ const NAME_HEAD = {
226
+ moon: ["moon/mare-imbrium", "moon/mare-tranquillitatis", "moon/oceanus-procellarum", "moon/mare-serenitatis", "moon/tycho", "moon/copernicus"],
227
+ mars: ["mars/olympus-mons", "mars/valles-marineris", "mars/hellas-planitia", "mars/arsia-mons", "mars/ascraeus-mons", "mars/pavonis-mons", "mars/gale"],
228
+ };
219
229
  /**
220
230
  * Read the `surface-names` attribute. Omitted, empty or `on` is on, with the view's own cap. `off` or `0` is off. A positive whole number is on and is the most names to show.
221
231
  *
@@ -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.44.1/dist/textures/";
14
+ export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.44.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.44.1/textures/";
26
+ export declare const TEXTURE_FAR_BASE = "https://cdn.jsdelivr.net/gh/johnmorrisdotca/wakusei-planets@v0.44.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.44.1";
1
+ export declare const VERSION = "0.44.2";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.44.1";
1
+ export const VERSION = "0.44.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnmorrisdotca/wakusei-planets",
3
- "version": "0.44.1",
3
+ "version": "0.44.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",