@johnmorrisdotca/wakusei-planets 0.44.0 → 0.44.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
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.44.1] - 2026-11-13
6
+
7
+ - **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.
8
+
9
+ - **Written names are not Tab stops** (MODULES-1275). With names on by default every name was a stop between the view and its controls. A name that only names is out of the Tab order; Tab reaches the view and the arrow keys turn it, with no click, on the body page, the space view and the embed page (tested), and an element added with no `tabindex` is a stop all the same.
10
+
11
+ - **The 1980 craft step waits for a draw after the date change** (MODULES-1274, test only): it read the drawn list from the draw before the change.
12
+
5
13
  ## [0.44.0] - 2026-11-13
6
14
 
7
15
  - **Names of the great features are written on a body** (MODULES-1231). When the body looked at is big enough, `surface-names` (on unless `off`) writes its most important named features on the surface: fame first, then size (`placeRank`). They face the camera, fade at the limb, and stay apart so they do not crowd: a name is not written over a dot of the places asked for, a craft or another body's dot, another body's name, or another feature name, and gives way when it would be. A number is how many. A press sends `wakusei-place`. Nothing is drawn for a name.
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.0/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.1/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.0/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.1/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.0) [Computer software]. https://github.com/johnmorrisdotca/wakusei-planets
537
+ > Morris, J. (2026). *Wakusei Planets* (version 0.44.1) [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
 
@@ -128,6 +128,8 @@ export interface PlaceMark {
128
128
  * The rules that keep the marks quiet, in CSS pixels: nothing is marked on a body under `fromPx` of radius on the screen; a named feature is marked once it is `featureFromPx` across (a famous one at any size);
129
129
  * no two marks are closer than `gapPx` (the one chosen first keeps its place); and a body gets one mark for every `sharePx` of its radius, 8 at least and `most` at most.
130
130
  *
131
+ * Written names (not dots) keep to a smaller rule: none below `nameFromPx` of radius, fading in over the next `nameFadePx`, at most one for every `namePerPx` of radius, and never one wider than the disc.
132
+ *
131
133
  * @example
132
134
  * ```ts
133
135
  * import { MARK_RULES } from "@johnmorrisdotca/wakusei-planets/places";
@@ -141,6 +143,9 @@ export declare const MARK_RULES: {
141
143
  readonly gapPx: 12;
142
144
  readonly sharePx: 4;
143
145
  readonly most: 60;
146
+ readonly nameFromPx: 70;
147
+ readonly nameFadePx: 20;
148
+ readonly namePerPx: 20;
144
149
  };
145
150
  /**
146
151
  * The marks to lay over a body: the places of the layers asked for that face the viewer (not too near the edge of the disc, where they would crowd), are inside the view, and are not crowded out by a mark
@@ -85,6 +85,8 @@ export function surfacePoint(view, lat, lon) {
85
85
  * The rules that keep the marks quiet, in CSS pixels: nothing is marked on a body under `fromPx` of radius on the screen; a named feature is marked once it is `featureFromPx` across (a famous one at any size);
86
86
  * no two marks are closer than `gapPx` (the one chosen first keeps its place); and a body gets one mark for every `sharePx` of its radius, 8 at least and `most` at most.
87
87
  *
88
+ * Written names (not dots) keep to a smaller rule: none below `nameFromPx` of radius, fading in over the next `nameFadePx`, at most one for every `namePerPx` of radius, and never one wider than the disc.
89
+ *
88
90
  * @example
89
91
  * ```ts
90
92
  * import { MARK_RULES } from "@johnmorrisdotca/wakusei-planets/places";
@@ -92,7 +94,7 @@ export function surfacePoint(view, lat, lon) {
92
94
  * console.log(MARK_RULES.gapPx, MARK_RULES.most);
93
95
  * ```
94
96
  */
95
- export const MARK_RULES = { fromPx: 40, featureFromPx: 14, gapPx: 12, sharePx: 4, most: 60 };
97
+ export const MARK_RULES = { fromPx: 40, featureFromPx: 14, gapPx: 12, sharePx: 4, most: 60, nameFromPx: 70, nameFadePx: 20, namePerPx: 20 };
96
98
  /**
97
99
  * The marks to lay over a body: the places of the layers asked for that face the viewer (not too near the edge of the disc, where they would crowd), are inside the view, and are not crowded out by a mark
98
100
  * that comes first. The visited sites come first, the famous before the rest, then the named features by size, and a feature is marked only once it is big enough on the screen to show (`MARK_RULES`;
@@ -118,6 +120,10 @@ export const MARK_RULES = { fromPx: 40, featureFromPx: 14, gapPx: 12, sharePx: 4
118
120
  export function placeMarks(places, layers, view, radiusKm, options) {
119
121
  if (layers.length === 0 || !(view.radiusPx >= MARK_RULES.fromPx))
120
122
  return [];
123
+ // a written name takes room: none on a small disc, a few on a middling one, and they come in gently
124
+ if (options?.label === true && !(view.radiusPx >= MARK_RULES.nameFromPx))
125
+ return [];
126
+ const come = options?.label === true ? Math.min(1, (view.radiusPx - MARK_RULES.nameFromPx) / MARK_RULES.nameFadePx) : 1;
121
127
  const wanted = [];
122
128
  for (const place of places) {
123
129
  const layer = layerOf(place.kind);
@@ -134,7 +140,7 @@ export function placeMarks(places, layers, view, radiusKm, options) {
134
140
  wanted.sort((a, b) => rank(a) - rank(b) || (b.feature?.diameterKm ?? 0) - (a.feature?.diameterKm ?? 0));
135
141
  }
136
142
  const most = Math.max(8, Math.min(MARK_RULES.most, Math.round(view.radiusPx / MARK_RULES.sharePx)));
137
- const cap = options?.limit === undefined ? most : Math.max(0, Math.min(MARK_RULES.most, options.limit));
143
+ const cap = Math.min(options?.limit === undefined ? most : Math.max(0, Math.min(MARK_RULES.most, options.limit)), options?.label === true ? Math.floor(view.radiusPx / MARK_RULES.namePerPx) : Infinity);
138
144
  const gap = options?.gapPx ?? MARK_RULES.gapPx;
139
145
  const out = [];
140
146
  for (const place of wanted) {
@@ -155,6 +161,9 @@ export function placeMarks(places, layers, view, radiusKm, options) {
155
161
  if (options?.label === true) {
156
162
  const lang = options.lang ?? "en";
157
163
  const mine = { ...nameBox(place.name[lang]), id: place.id };
164
+ // never wider than the disc it is written on
165
+ if (mine.halfWidth > view.radiusPx)
166
+ continue;
158
167
  const clash = (px, py) => {
159
168
  const box = { x: px, y: py, ...mine };
160
169
  if (px - mine.halfWidth < 0 || px + mine.halfWidth > view.width || py - mine.halfHeight < 0 || py + mine.halfHeight > view.height)
@@ -180,7 +189,7 @@ export function placeMarks(places, layers, view, radiusKm, options) {
180
189
  continue;
181
190
  if (options?.label !== true && out.some((mark) => Math.hypot(mark.x - x, mark.y - y) < gap))
182
191
  continue;
183
- out.push({ place, layer: layerOf(place.kind), x, y, ...(options?.label === true ? { label: true, fade: Math.min(1, (face - 0.12) / 0.4) } : {}) });
192
+ out.push({ place, layer: layerOf(place.kind), x, y, ...(options?.label === true ? { label: true, fade: Math.min(1, (face - 0.12) / 0.4) * come } : {}) });
184
193
  }
185
194
  return out;
186
195
  }
@@ -228,10 +228,15 @@ export function createPlaceLayer(root, options) {
228
228
  // a name for a place the page asked for stands in for its dot and takes the press as the dot does; a name only is the picture's, and takes no press
229
229
  const pure = mark.label === true && mark.nameOnly === true ? "1" : undefined;
230
230
  if (entry.button.dataset.pure !== pure) {
231
- if (pure === undefined)
231
+ if (pure === undefined) {
232
232
  delete entry.button.dataset.pure;
233
- else
233
+ entry.button.removeAttribute("tabindex");
234
+ }
235
+ else {
234
236
  entry.button.dataset.pure = pure;
237
+ // a written name is part of the picture, and a dozen of them would be a dozen stops between the view and its controls
238
+ entry.button.tabIndex = -1;
239
+ }
235
240
  }
236
241
  const opacity = mark.label === true ? (mark.fade ?? 1).toFixed(2) : "";
237
242
  if (entry.button.style.opacity !== opacity)
@@ -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.0/dist/textures/";
14
+ export declare const TEXTURE_BASE = "https://cdn.jsdelivr.net/npm/@johnmorrisdotca/wakusei-planets@0.44.1/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.0/textures/";
26
+ export declare const TEXTURE_FAR_BASE = "https://cdn.jsdelivr.net/gh/johnmorrisdotca/wakusei-planets@v0.44.1/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.0";
1
+ export declare const VERSION = "0.44.1";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.44.0";
1
+ export const VERSION = "0.44.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnmorrisdotca/wakusei-planets",
3
- "version": "0.44.0",
3
+ "version": "0.44.1",
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",