@johnmorrisdotca/wakusei-planets 0.31.0 → 0.33.0

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/NOTICE.md +16 -1
  3. package/README.md +60 -5
  4. package/dist/bodies/all.d.ts +1 -0
  5. package/dist/bodies/all.js +1 -0
  6. package/dist/bodies/minor.d.ts +1 -0
  7. package/dist/bodies/minor.js +16 -0
  8. package/dist/data/minor.d.ts +3 -0
  9. package/dist/data/minor.js +7 -0
  10. package/dist/data/tables.d.ts +4 -2
  11. package/dist/data/tables.js +1 -1
  12. package/dist/data-door.d.ts +357 -0
  13. package/dist/data-door.js +393 -0
  14. package/dist/door/book.d.ts +133 -0
  15. package/dist/door/book.js +256 -0
  16. package/dist/door/host.d.ts +30 -0
  17. package/dist/door/host.js +44 -0
  18. package/dist/door/index.d.ts +6 -0
  19. package/dist/door/index.js +10 -0
  20. package/dist/door/map.d.ts +152 -0
  21. package/dist/door/map.js +162 -0
  22. package/dist/door/own.d.ts +36 -0
  23. package/dist/door/own.js +86 -0
  24. package/dist/door/points.d.ts +61 -0
  25. package/dist/door/points.js +175 -0
  26. package/dist/door/small-bodies.d.ts +157 -0
  27. package/dist/door/small-bodies.js +148 -0
  28. package/dist/element.d.ts +21 -0
  29. package/dist/element.js +85 -6
  30. package/dist/embed.d.ts +1 -1
  31. package/dist/embed.js +3 -3
  32. package/dist/ephemeris.d.ts +7 -7
  33. package/dist/ephemeris.js +36 -13
  34. package/dist/facts.d.ts +28 -4
  35. package/dist/facts.js +24 -2
  36. package/dist/index.d.ts +1 -1
  37. package/dist/index.js +1 -1
  38. package/dist/nearest.js +6 -4
  39. package/dist/scene/body.d.ts +4 -1
  40. package/dist/scene/body.js +2 -1
  41. package/dist/scene/detail.d.ts +29 -12
  42. package/dist/scene/detail.js +217 -135
  43. package/dist/scene/painter.d.ts +3 -0
  44. package/dist/scene/painter.js +7 -4
  45. package/dist/scene/textures.d.ts +9 -2
  46. package/dist/scene/textures.js +17 -0
  47. package/dist/space/arrows.d.ts +29 -3
  48. package/dist/space/arrows.js +38 -6
  49. package/dist/space/bodies.d.ts +6 -6
  50. package/dist/space/bodies.js +6 -6
  51. package/dist/space/element.d.ts +28 -0
  52. package/dist/space/element.js +74 -6
  53. package/dist/space/frame.d.ts +28 -3
  54. package/dist/space/frame.js +40 -4
  55. package/dist/space/index.d.ts +2 -2
  56. package/dist/space/index.js +2 -2
  57. package/dist/space/scale.d.ts +4 -4
  58. package/dist/space/scale.js +8 -2
  59. package/dist/space/scene.d.ts +12 -2
  60. package/dist/space/scene.js +43 -14
  61. package/dist/stops.d.ts +1 -1
  62. package/dist/stops.js +4 -1
  63. package/dist/tables/all.d.ts +1 -0
  64. package/dist/tables/all.js +1 -0
  65. package/dist/tables/lazy.d.ts +5 -0
  66. package/dist/tables/lazy.js +12 -0
  67. package/dist/tables/minor.d.ts +1 -0
  68. package/dist/tables/minor.js +317 -0
  69. package/dist/textures/vesta-1024.webp +0 -0
  70. package/dist/textures/vesta-512.webp +0 -0
  71. package/dist/version.d.ts +1 -1
  72. package/dist/version.js +1 -1
  73. package/package.json +17 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.33.0] - 2026-11-11
6
+
7
+ - **CI installs Playwright's browsers in bounded, cached steps** (KAZOKU-UI-100). A slow package mirror held `playwright install --with-deps` for the whole job limit on 2026-11-09 and 2026-11-10, so no test ran and the failure read as a test failure. `.github/actions/playwright` (the family's, kazoku-ui's copy is canonical) caches the browsers by Playwright's version, then installs the system libraries in a step of their own: two tries, each cut off after 7 minutes, and a failure that says it is the runner's package mirror and that nothing was run. Free: GitHub-hosted Linux runners and the cache.
8
+ - **`pnpm docs:check` reads a guide's front matter as strict YAML** (KAZOKU-UI-102). A title or description holding a colon and a space without quotes passed the old line reader while GitHub showed "Error in user YAML" above the page. `scripts/docs-site.mjs` (the family's, version `2026-11-10-strict-front-matter`) now fails with the file, the line and a plain sentence on an unquoted colon, an unquoted " #", a value that starts with a YAML character (`[ { & * ! | > % @` or a backtick), a tab, an indented continuation, a key twice and an unclosed quote.
9
+ - **Two arrows on each orbit, with a setting for the count** (MODULES-909, John: "too many arrows ... we probably only need 2 or max 4"). `ARROWS_PER_ORBIT` is now 2 (it was 6) and an orbit carries at most 4 (`MAX_ARROWS_PER_ORBIT`). `<wakusei-space>` has the attribute and property `arrows` for the count: 2 by default, 0 for none, anything else a whole number from 0 to 4 (`arrowCount` reads it); `arrowSites(line, count)` takes the same. The Moon's line has them too.
10
+ - **The far orbits are smooth curves** (MODULES-909). Sedna's, Eris's, Gonggong's and Haumea's lines (and Halley's, Pholus's and Chiron's) are cut at equal steps of the eccentric anomaly, not of time: cut in time, 96 points left the sharp turn near the Sun as one long straight stroke with corners. And `kepler` solved long orbits (e from 0.8, Sedna's 0.86) wrongly for a negative mean anomaly, which scattered half of Sedna's line far from the ellipse: it starts from a place on the right side of the orbit now.
11
+
12
+ - **Vesta, Pallas, Chiron, Pholus and Halley's comet are bodies** (MODULES-553). `MINOR_IDS` (and the type `MinorId`) name them and `BodyFacts.kind` has three new values, `asteroid`, `centaur` and `comet`; `BODY_IDS` is 52 long (it was 47). Each has its size, its shape where one is published (Vesta 569 x 554 x 453 km, Pallas 568 x 532 x 448, Halley 14.9 x 8.2), pole, rotation, colour, a line drawing and a shaded look, and a name in Japanese (ベスタ, パラス, ケイロン, ポルス, ハレー彗星); the numbers are JPL's Small-Body Database's and NOTICE.md gives each source and says which poles are estimated (Chiron's, Pholus's and Halley's are along the orbit's pole; Halley is drawn still). Vesta's painted look is Dawn's own photomap (public domain, 2.05 MB of pictures now ship, the budget is 2.1). The other four have never been imaged beyond a point of light (Halley's nucleus was photographed by Giotto, whose pictures' terms keep them out), so they are drawn from their numbers.
13
+ - **Their positions are tables fitted to JPL Horizons, within 1 arc-second** (MODULES-553). `@johnmorrisdotca/wakusei-planets/tables/minor` (new; also in `/tables`) holds Vesta and Pallas for 1900 to 2100 and Chiron, Pholus and Halley for 1800 to 2200, made by `scripts/make-minor-data.py`, about 48 kB gzipped. A comet moves fast near the Sun, so a table can now have segments of unequal length: `FittedTable.edges` says where each starts (Halley's are 43 days long at its perihelion and 16 years at its aphelion). Measured on 12 dates (`test/data/horizons-minor.json`, one Horizons request a date) the worst is 0.53 arc-seconds. `heliocentric`, `heliocentricModel` and `meanSunAu` take a `MinorId`; outside the table's years a body is a plain ellipse from Horizons' osculating elements (Halley's, from 1968, are 31 degrees off by 2026: `<wakusei-space>` loads the table itself, and `<wakusei-body>` fetches it when a minor body has a date). `nearest`, `within`, `closestApproach` and `conjunctions` include them, with `kind: "asteroid" | "centaur" | "comet"`, and `JOURNEY_STOPS` has a row for each (Vesta's and Pallas's GM from the Small-Body Database).
14
+ - **The space view offers them** (MODULES-553). `frameAt` has `minors` (`SPACE_MINORS`, `SpaceMinor`), `SPACE_BODIES` is the twenty-four bodies it places, the hopper goes Mars, Vesta, Ceres, Pallas, Jupiter and Saturn, Chiron, Halley, Uranus, Pholus, Neptune (by the size of their orbits), `findBody` reads their names in either language, and `bodyKindOf` says what they are. A small body has an orbit line (`planetOrbit` cuts a long ellipse at equal steps of the eccentric anomaly, so Halley's turn round the Sun is smooth), a name and a ring, and is drawn once it is half a pixel across (at true scale none of them is; the compressed scale gives each 0.2 Earth radii). The demo's picker has a "Small bodies" kind, and the body page and the embed builder a "Small bodies" row.
15
+ - **The test of the Horizons fixture's dates.** Horizons gives every time of a list the correction between terrestrial and universal time of the *first* date of the list, so `test/data/horizons.json` (a list from 1800 or 1900) puts a date in 2026 about a minute off. That is invisible for the slow bodies it holds and 0.6 arc-seconds for Vesta, so the minor bodies' reference is a file of its own with one request a date (`python3 -I scripts/fetch-horizons-reference.py minors`).
16
+
17
+ ## [0.32.0] - 2026-11-10
18
+
19
+ - **The data door: `@johnmorrisdotca/wakusei-planets/door`** (MODULES-831, step 2; the shapes are kazoku-ui's `templates/data-door.ts`, copied unchanged to `src/data-door.ts`). One way to hand the package outside data and to say whose data is on the screen. `BodyMapSource` is a `TileSource` for the colour or the height of a body's map (the family's `MapPlace` and `ImageTile`; the keys end in `level/column/row` on the package's 512 pixel pyramid, and `mapKeys` names them), and `tilesSource(base)` is the package's own folder of tiles as a source, which is what the `tiles` attribute means; the attribute stays. `SmallBody` (name, `a`, `e`, `i`, `node`, `peri`, `M0`, `epoch`, `H`) and `SmallBodySource` are a record source of small bodies, read once, at most 200,000, with the records that cannot be drawn left out and counted; `smallBodyAt` says where one is on a date. `<wakusei-body>` and `<wakusei-space>` take `sources`, `addSource` (checked at once, returns its `remove()`), `removeSource`, `enableSource` and `data="own"`, and have `credits()` and the event `wakusei-creditschange`; `creditLine` writes the credit line with the licence beside each source, "non-commercial" or "share-alike" included, in English and Japanese. Off aborts a source's loads, frees its tiles and records, and drops its credit. The tiles of every body in a view share one 48 MB budget (`TILE_BUDGET_BYTES`), six loads at a time per source, and nothing is sent at rest. `OWN_SOURCES` (the pictures, the tiles and the orbit series) and `ownCredit` write the package's own credits from `NOTICE.md`, and a test holds that none is non-commercial or share-alike. A window of tiles that could not be made is no longer tried again after 30 seconds: it is tried again when the view changes. Every attribute and function is as it was; `createPainter` takes an optional `book`.
5
20
  ## [0.31.0] - 2026-11-10
6
21
 
7
22
  - **The body looked at is shown whole with a margin, no orbit line crosses it, and the demo opens moving** (machine1's review of the first hand-in). Zoom 1 now frames the body about 80% of the view's shorter side across (`FIT_DISTANCE` 4.1, it was 3.4 and the disc nearly touched the edges; Saturn is framed with its rings at 2.3 radii), so the zoom ceiling is 3.6 (the camera is as near as before). Close to a body (its disc 30 CSS pixels or more across its radius) only the orbit lines of its own system are drawn and the part of them within about twelve radii fades out, so no line is ever seen across the disc (`stats.orbits.hidden`). The demo's space page opens playing, from now, an hour a second, when its address names no date, speed or play and the reader has not asked for reduced motion; with reduced motion it opens still with Play ready. On the full-screen page the scale line sits at the bottom right and overlaps nothing. Browser tests: the disc is 72% to 88% of the shorter side, centred, at 1440x900, 390x844 and 2400x700 in the panel and full screen; the picture of the disc is the same with the lines on and off; the picture changes within two seconds with nothing touched.
package/NOTICE.md CHANGED
@@ -31,6 +31,15 @@ Ceres, Orcus, Haumea, Quaoar, Makemake, Gonggong, Eris and Sedna (Pluto is with
31
31
 
32
32
  The tests compare the Galilean moons and four planets with astronomy-engine (MIT, https://github.com/cosinekitty/astronomy), a development dependency that is never shipped.
33
33
 
34
+ ## The minor bodies
35
+
36
+ Vesta, Pallas, Chiron, Pholus and Halley's comet (`MINOR_IDS`). Values read on 2026-11-10 from JPL's Small-Body Database (https://ssd-api.jpl.nasa.gov/sbdb.api) and Horizons (https://ssd.jpl.nasa.gov/api/horizons.api); both are NASA/JPL, not subject to copyright in the United States (credit: NASA/JPL-Caltech).
37
+
38
+ - **Where they are**: JPL Horizons, fitted as Chebyshev tables from the solar system's barycentre (`scripts/make-minor-data.py`, `src/tables/minor.ts`) like the dwarf planets, with the Sun's swing about the barycentre worked out from the planets' masses: Vesta and Pallas 1900 to 2100, Chiron, Pholus and Halley 1800 to 2200, each within 1 arc-second of Horizons on the samples left out of each fit (0.6 at the worst on the 12 dates of `test/data/horizons.json`, one request a date). Halley's segments are of unequal length (43 days near the Sun, 16 years far from it). Halley is Horizons' record 90000030, the solution of the 1986 apparition (observations 1835 to 1994): a comet's orbit past that arc is a prediction, and its non-gravitational forces are in the solution. Outside the tables' years each runs on Horizons' osculating elements (Vesta 2020-01-01, Pallas 2017-04-27, Chiron 2017-06-12, Pholus 2010-06-22, Halley 1968-01-20; `src/data/minor.ts`) as a plain ellipse: a few degrees off a century from the epoch, and Pallas, a planet's pull on an orbit tipped 35 degrees, most.
39
+ - **Sizes and spin**, as the Small-Body Database gives them: Vesta, 569.24 x 554.48 x 452.66 km, pole RA 309.0611 and Dec 42.2324, rotation 5.3421276 h, GM 17.2882844 km^3/s^2, Park et al. 2025, Nature Astronomy (DOI 10.1038/s41550-025-02533-7); its prime meridian at J2000 (285.39 degrees, the Claudia system of Dawn's maps) is the IAU's, Archinal et al. 2018, Celestial Mechanics and Dynamical Astronomy 130:22. Pallas, 568 x 532 x 448 km, Marsset et al. 2020, Nature Astronomy 4:569; pole from Carry et al. 2010, Icarus 205:460 (ecliptic longitude 30, latitude -16, which is RA 33, Dec -3), rotation 7.8132214 h; GM 13.63 km^3/s^2, Vernazza et al. 2021, A&A 654:A56. Chiron, a diameter of 166 km (an occultation, listed by the Small-Body Database as "Dunham occultation list: Duham 1998"), rotation 5.918 h, Warner et al. 2009 (the Lightcurve Database). Pholus, a diameter of 190 km, Earth, Moon, and Planets 89:117 (2002), rotation 9.98 h, Lightcurve Database. Halley's nucleus, 14.9 x 8.2 km, Keller et al. 1987, A&A 187:807 (the Giotto flyby), radius 5.5 km (the Small-Body Database). Colours from the published albedos and spectral types (Vesta, V-type, albedo 0.42; Pallas, B-type, 0.155; Chiron, Cb, 0.15; Pholus, very red, 0.044; Halley, 0.04).
40
+ - **Vesta's picture** is Dawn's own: the global photomap on Wikimedia Commons (public domain; table above). The other four have never been imaged as more than a few pixels, except Halley, whose nucleus Giotto photographed in 1986 (ESA; those pictures' terms keep them out of this package): their shaded looks and line drawings are generic craters on the numbers' shape, which this paragraph says.
41
+ - **Estimated, not measured** (the pictures say so only here): Chiron's and Pholus's poles are not measured, so each is drawn with its spin axis along its orbit's pole (RA 258.793, Dec 72.317 for Chiron; RA 334.495, Dec 66.246 for Pholus). Halley's nucleus tumbles (about 2.2 days, a period this package does not model): it is drawn still, its axis along its orbit's pole. Vesta's and Pallas's features on the line look (Vesta's Rheasilvia basin at the south pole, and two bands for its equatorial troughs) are Dawn's; the craters are generic.
42
+
34
43
  ## The spacecraft
35
44
 
36
45
  Voyager 1 and 2, New Horizons, Pioneer 10 and 11, Cassini, Galileo, Juno, Parker Solar Probe and the James Webb Space Telescope. Values read on 2026-11-08. NASA content is not subject to copyright in the United States; credit: NASA/JPL-Caltech. This package is not endorsed by NASA and uses none of its insignia.
@@ -93,6 +102,7 @@ Venus, Saturn, Neptune and the Sun were replaced from Solar System Scope's equir
93
102
  | `enceladus-*.webp` | Enceladus | [Enceladus Color Map.jpg](https://commons.wikimedia.org/wiki/File:Enceladus_Color_Map.jpg) | Public domain | NASA/JPL-Caltech/Space Science Institute/Lunar and Planetary Institute | Cassini global colour map (PIA18435), turned half way round the same way as Rhea's (the source does not say where it is centred; the fractured trailing terrain is put at 90 degrees east); the colours are false-colour (the blue of the tiger stripes is ultraviolet) and are turned most of the way to grey |
94
103
  | `mimas-*.webp` | Mimas | [Map of Mimas 2010-02 PIA12780.jpg](https://commons.wikimedia.org/wiki/File:Map_of_Mimas_2010-02_PIA12780.jpg) | Public domain | NASA/JPL/Space Science Institute | Cassini ISS map of February 2010 (PIA12780), cropped inside its frame and labels; Herschel is at 110 degrees west as its own scale says |
95
104
  | `ceres-*.webp` | Ceres | [PIA20354-Ceres-DwarfPlanet-MercatorMap-HAMO-20160322-0DegreeLongitude.jpg](https://commons.wikimedia.org/wiki/File:PIA20354-Ceres-DwarfPlanet-MercatorMap-HAMO-20160322-0DegreeLongitude.jpg) | Public domain | NASA/JPL-Caltech/UCLA/MPS/DLR/IDA | Dawn's colourised global map of Ceres (PIA20354, 140 m a pixel), longitude 0 in the middle as the file says (Occator's bright spots fall at 239 degrees east); the green and yellow high latitudes, where Dawn's colour coverage is incomplete (the map says so), are made the surface's own grey keeping their detail, and the last rows with no data repeat the nearest real ones; the colour is turned most of the way to grey |
105
+ | `vesta-*.webp` | Vesta | [Vesta map for GeoHack.png](https://commons.wikimedia.org/wiki/File:Vesta_map_for_GeoHack.png) | Public domain | NASA/JPL-Caltech/UCLA/MPS/DLR/IDA (as the file page gives it; hosted by the USGS Astrogeology Science Center's Gazetteer of Planetary Nomenclature) | Dawn Framing Camera global photomap of Vesta (grey, 3561 x 1781, north up), whose left edge is 330 degrees east (the file says so), turned a twelfth of the way round so longitude 0 is in the middle; the grey is given a faint warmth. Rheasilvia, the great basin at the south pole, shows at the bottom |
96
106
  | `tethys-*.webp` | Tethys | [Tethys Color Map.jpg](https://commons.wikimedia.org/wiki/File:Tethys_Color_Map.jpg) | Public domain | NASA/JPL-Caltech/Space Science Institute/Lunar and Planetary Institute | Cassini global colour map (PIA18439, Paul Schenk), turned half way round so longitude 0 is in the middle (the source does not say where it is centred; Odysseus, at 129 degrees west, falls at 131 degrees west and the dark trailing side at 90 degrees east); the colours are enhanced (ultraviolet to infrared) and are turned about half way to grey |
97
107
  | `dione-*.webp` | Dione | [Dione Color Map.jpg](https://commons.wikimedia.org/wiki/File:Dione_Color_Map.jpg) | Public domain | NASA/JPL-Caltech/Space Science Institute/Lunar and Planetary Institute | Cassini global colour map (PIA18434), turned half way round the same way as Tethys's (the source does not say where it is centred; the dark trailing side with its wispy fractures is put at 90 degrees east); the colours are enhanced and are turned about half way to grey |
98
108
  | `iapetus-*.webp` | Iapetus | [Iapetus Color Map.jpg](https://commons.wikimedia.org/wiki/File:Iapetus_Color_Map.jpg) | Public domain | NASA/JPL-Caltech/Space Science Institute/Lunar and Planetary Institute | Cassini global colour map (PIA18436), turned half way round the same way (the source does not say where it is centred; the dark leading side, Cassini Regio, is put at 270 degrees east, 90 degrees west); the colours are enhanced and are turned a third of the way to grey |
@@ -100,7 +110,7 @@ Venus, Saturn, Neptune and the Sun were replaced from Solar System Scope's equir
100
110
  | `charon-*.webp` | Charon | [Charon map iau1803c.jpg](https://commons.wikimedia.org/wiki/File:Charon_map_iau1803c.jpg) | Public domain | NASA/Johns Hopkins University Applied Physics Laboratory/Southwest Research Institute (via the IAU) | New Horizons global map of Charon (iau1803c, no labels or grid), as it is, with longitude 0 in the middle (the source does not say; the sharp hemisphere New Horizons saw best is the one that faces Pluto, which is longitude 0); the south, in the polar night New Horizons never saw, is continued from the last real rows and fades to the mean grey |
101
111
  | `saturn-ring-2048.webp` | Saturn's rings | [Saturn's rings in visible light and radio.jpg](https://commons.wikimedia.org/wiki/File:Saturn's_rings_in_visible_light_and_radio.jpg) | Public domain | NASA / JPL / Space Science Institute | Cassini's natural-colour mosaic of the lit rings (PIA07874, from PIA06175), read along one radius into a strip of 2048 colours and opacities from 74,794 to 137,035 km. The radii are fitted to five edges the picture shows (the B ring's inner edge, the two edges of the Cassini Division, the Encke gap and the A ring's outer edge), each within 300 km. The opacity is taken from the brightness, and the colour balance is moved to match the Saturn portrait above; the F ring and the D ring are not in the picture |
102
112
 
103
- The package does not ship the 2048 pixel widths: `TEXTURE_FAR_BASE` fetches them from this repository by jsDelivr's GitHub address when a view is zoomed in. The 512 and 1024 pixel widths of every picture, and the ring strip, are 1.94 MB in the package (the nine of 0.2.0 were 0.53 MB; Ceres adds 0.13 MB and Tethys, Dione, Iapetus, Triton and Charon 0.45 MB). Where a source does not say where its map is centred, its row says what the picture was matched to.
113
+ The package does not ship the 2048 pixel widths: `TEXTURE_FAR_BASE` fetches them from this repository by jsDelivr's GitHub address when a view is zoomed in. The 512 and 1024 pixel widths of every picture, and the ring strip, are 2.05 MB in the package (the nine of 0.2.0 were 0.53 MB; Ceres adds 0.13 MB, Tethys, Dione, Iapetus, Triton and Charon 0.45 MB, and Vesta 0.08 MB). Where a source does not say where its map is centred, its row says what the picture was matched to.
104
114
 
105
115
  ## Finer map tiles
106
116
 
@@ -132,6 +142,11 @@ Not tiled, because no finer public-domain map was found that this package can us
132
142
 
133
143
  The generic detail of a close zoom (docs/guides/close-zoom.md) is noise made in the shader. It is no data and takes nothing from any source.
134
144
 
145
+ ## The data door
146
+
147
+ - **The package's own credits (`OWN_SOURCES` in `@johnmorrisdotca/wakusei-planets/door`, MODULES-831, written 2026-11-10)**: three rows, written from the entries of this file and read nowhere else. `wakusei-pictures` is the surface pictures (Surface pictures above: NASA, USGS and JPL maps that are public domain, and Solar System Scope's and Nestaeric's maps, CC BY 4.0; its licence name is the stricter, "CC BY 4.0", read 2026-11-02). `wakusei-tiles` is the finer map tiles (Finer map tiles above: public domain, read 2026-11-09). `wakusei-orbits` is the series and tables the positions come from (The numbers above: IMCCE's VSOP87B and ELP2000-82B, which "carry no licence text" and are published for use with the credit, and JPL Horizons, NASA/JPL-Caltech, read 2026-11-07; its licence name says "Published for use with credit"). A test holds that none of the three is marked non-commercial or share-alike.
148
+ - **Data a caller hands in is not part of this package.** A source passed to `addSource` or `sources` carries its own credit and licence, and the credit line prints them (with "non-commercial" or "share-alike" where the source says so). This package bundles no such data and takes none as a dependency. The small-body source is a list of orbital elements a caller supplies; this package holds no catalogue of them.
149
+
135
150
  ## Orbiter's MIT notice
136
151
 
137
152
  The TASS1.7 table above was read from Orbiter (https://github.com/orbitersim/orbiter), whose licence is:
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.31.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.33.0/docs/images/lineup-desk.png" width="640"></p>
23
23
 
24
24
  ## Who it is for
25
25
 
@@ -96,7 +96,7 @@ A bundled app imports it: `import "@johnmorrisdotca/wakusei-planets/element"` (a
96
96
 
97
97
  ## Features
98
98
 
99
- - The Sun, the eight planets, Pluto, eight more dwarf planets and 29 moons, each with its real size, flattening, axial tilt, pole and rotation as data.
99
+ - The Sun, the eight planets, Pluto, eight more dwarf planets, five minor bodies (the asteroids Vesta and Pallas, the centaurs Chiron and Pholus and Halley's comet) and 29 moons, each with its real size, flattening, axial tilt, pole and rotation as data.
100
100
  - Three looks: a clean `line` drawing (an SVG string), a shaded `realistic` sphere worked out in a shader, and a `painted` surface map from public-domain imagery.
101
101
  - The sky for any date and time: a body's pole, rotation, phase and ring opening as the Earth sees it, and a planet's moons where they are then.
102
102
  - One WebGL context for the page, nothing drawn at rest, at most thirty frames a second, and everything freed when an element leaves.
@@ -126,7 +126,7 @@ Import the element once in client code, and the entry point of each body you dra
126
126
  | `realistic` | A shaded sphere drawn from the body's real colours and features, lit from the Sun's side, with the rings casting shadows. No pictures: the surface is worked out in a shader. | `three`, the body's entry point |
127
127
  | `painted` | A real surface map from public-domain NASA, USGS and JPL imagery. Small pictures first (1.31 MB for all of them in the package), a sharper one fetched when you zoom in, and finer map tiles for the part in view when you zoom right up, in a body, a portrait or the space view (Mars, the Moon, the Earth and ten moons: [close zoom](docs/guides/close-zoom.md)). | `three`, the body's entry point |
128
128
 
129
- Every body has its real size relative to the others (`scale-to="jupiter"`), its axial tilt and its rotation. The Sun, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune and Pluto are drawn, and so are the eight other dwarf planets (Ceres, Orcus, Haumea, Quaoar, Makemake, Gonggong, Eris and Sedna; Haumea and Quaoar as the long shapes they are, and Ceres with a painted map from Dawn) and 29 moons (the Moon, Phobos and Deimos, the four Galilean moons, Saturn's seven larger moons, Uranus's five, Proteus, Triton and Nereid, Charon, Nix and Hydra, and Vanth, Hiʻiaka, Namaka and Dysnomia, the moons of the dwarf planets whose orbits are published with a date). The Earth is drawn like the rest in the realistic and painted looks (NASA's Blue Marble), and its line look is [chikyu-earth](https://github.com/johnmorrisdotca/chikyu-earth)'s own globe: `import "@johnmorrisdotca/wakusei-planets/earth"` (it needs `@johnmorrisdotca/chikyu-earth` 0.10.0 or later installed). The painted looks cover the Sun, the planets from Mercury to Earth and Pluto, Ceres, the Moon, the four Galilean moons, Saturn's Mimas, Enceladus, Tethys, Dione, Rhea, Titan and Iapetus, Triton and Charon, and Saturn's rings are Cassini's own picture of them.
129
+ Every body has its real size relative to the others (`scale-to="jupiter"`), its axial tilt and its rotation. The Sun, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune and Pluto are drawn, and so are the eight other dwarf planets (Ceres, Orcus, Haumea, Quaoar, Makemake, Gonggong, Eris and Sedna; Haumea and Quaoar as the long shapes they are, and Ceres with a painted map from Dawn) five minor bodies (Vesta, with Dawn's own map, Pallas, Chiron, Pholus and Halley's comet, each its own shape, size and spin as the Small-Body Database has them) and 29 moons (the Moon, Phobos and Deimos, the four Galilean moons, Saturn's seven larger moons, Uranus's five, Proteus, Triton and Nereid, Charon, Nix and Hydra, and Vanth, Hiʻiaka, Namaka and Dysnomia, the moons of the dwarf planets whose orbits are published with a date). The Earth is drawn like the rest in the realistic and painted looks (NASA's Blue Marble), and its line look is [chikyu-earth](https://github.com/johnmorrisdotca/chikyu-earth)'s own globe: `import "@johnmorrisdotca/wakusei-planets/earth"` (it needs `@johnmorrisdotca/chikyu-earth` 0.10.0 or later installed). The painted looks cover the Sun, the planets from Mercury to Earth and Pluto, Ceres, the Moon, the four Galilean moons, Saturn's Mimas, Enceladus, Tethys, Dione, Rhea, Titan and Iapetus, Triton and Charon, and Saturn's rings are Cassini's own picture of them.
130
130
 
131
131
  ## A star from its numbers
132
132
 
@@ -313,13 +313,66 @@ A body that turns by itself and a moving sky, in HTML:
313
313
  <wakusei-body body="venus" look="realistic" time="2026-11-02T12:00:00Z" turn="12" live="hover"></wakusei-body>
314
314
  ```
315
315
 
316
+ ## Outside data
317
+
318
+ The package draws; you bring the data. `@johnmorrisdotca/wakusei-planets/door` takes a finer map of a body, or a list of small bodies, as a **source**: a small object that carries its own licence and credit, so the page can always say whose data is on the screen. Without a source the package draws exactly what it did before, from its own pictures, tiles and series. A source of yours may be non-commercial or share-alike; the credit line says so beside the licence, and the package never bundles one.
319
+
320
+ ```js
321
+ import { createSourceBook, creditLine, smallBodyAt } from "@johnmorrisdotca/wakusei-planets/door";
322
+
323
+ // A source of your own: here two small bodies held in memory (the second has a number that is not one, so it is left out). A real one would read a catalogue, and says whose it is and under what licence.
324
+ const mine = {
325
+ kind: "records",
326
+ info: {
327
+ id: "my-rocks",
328
+ name: { en: "My rocks", ja: "私の小天体" },
329
+ credit: { en: "My rocks, A. Person (2026)", ja: "私の小天体(A. Person、2026年)" },
330
+ licence: { name: "CC BY-NC 4.0", url: "https://creativecommons.org/licenses/by-nc/4.0/", nonCommercial: true },
331
+ url: "https://example.org/my-rocks",
332
+ retrieved: "2026-11-10",
333
+ },
334
+ records: () => [
335
+ { name: "Ceres", a: 2.7656, e: 0.0795, i: 10.588, node: 80.25, peri: 73.3, M0: 291.4, epoch: 2461000.5, H: 3.34 },
336
+ { name: "Broken", a: Number.NaN, e: 0.1, i: 5, node: 0, peri: 0, M0: 0, epoch: 2461000.5, H: 12 },
337
+ ],
338
+ };
339
+
340
+ // An element keeps a book like this one: `space.addSource(mine)` is `book.addSource(mine)`.
341
+ const book = createSourceBook();
342
+ book.addSource(mine);
343
+ await book.ready();
344
+ const [ceres] = book.smallBodies();
345
+ const [x, y, z] = smallBodyAt(ceres, 2461000.5);
346
+ console.log(`${book.smallBodies().length} small body, ${book.stats().records["my-rocks"].skipped} left out: ${ceres.name} is ${Math.hypot(x, y, z).toFixed(2)} au from the Sun`);
347
+ const credits = [{ source: mine.info, own: false, used: book.smallBodies().length }];
348
+ console.log(creditLine(credits, "en"));
349
+ console.log(creditLine(credits, "ja"));
350
+
351
+ book.enableSource("my-rocks", false);
352
+ console.log(`${book.smallBodies().length} small bodies with the source off`);
353
+ ```
354
+
355
+ `<wakusei-space>` draws small bodies as points in one instanced draw, and `<wakusei-body>` and `<wakusei-space>` both take a map of a body to lay over its own picture. Both have `sources` and `addSource(source)`, which checks the source at once and returns the way to remove it, `removeSource(id)`, `enableSource(id, false)` and the attribute `data="own"` to switch outside sources off (their loads abort and their tiles are freed), and `credits()` with the event `wakusei-creditschange` for the credit line.
356
+
357
+ ```js no-run
358
+ import { creditLine, tilesSource } from "@johnmorrisdotca/wakusei-planets/door";
359
+ import "@johnmorrisdotca/wakusei-planets/space/element";
360
+
361
+ const space = document.querySelector("wakusei-space");
362
+ space.addSource(mine); // the source above: its points are in the next frame
363
+ space.addSource(tilesSource("/my-tiles/")); // what tiles="/my-tiles/" means
364
+ space.addEventListener("wakusei-creditschange", () => console.log(creditLine(space.credits(), "en")));
365
+ ```
366
+
367
+ The tiles of every body share one 48 MB budget, six loads at a time for a source, and nothing is sent at rest. `OWN_SOURCES` and `ownCredit` give the package's own credits, `mapKeys` helps a source of your own name the tiles of a place, and `readSmallBodies` and `smallBodyAt` read a list of small bodies and say where one is on a date. The [guide](docs/guides/data-door.md) has the shapes and the rules.
368
+
316
369
  ## The code builder
317
370
 
318
371
  [The code builder](https://johnmorrisdotca.github.io/wakusei-planets/builder.html) is one screen: choose which planet's system, the body, the look, the size, the sky and the turning, then pick how your page is made and copy the code. It is the family's embed panel with those choices inside it, built from `embedCode`, so it writes what the package writes. [Put it in your page](docs/guides/put-it-in-your-page.md) is its guide.
319
372
 
320
373
  ## The portrait builder
321
374
 
322
- <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.31.0/docs/images/portrait-family.png" width="640"></p>
375
+ <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.33.0/docs/images/portrait-family.png" width="640"></p>
323
376
 
324
377
  [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.
325
378
 
@@ -409,6 +462,7 @@ Each guide has a Japanese twin in [docs/guides/ja](docs/guides/ja/getting-starte
409
462
  | [The size line-up](docs/guides/size-lineup.md) | The Sun and the largest stars at true relative size, with each radius, its error and its paper, where the papers disagree, every way to put it in a page |
410
463
  | [Zoom and pan](docs/guides/zoom-and-pan.md) | Every view zooms and moves by itself: the range of each and why it ends there, the bar, the embed page |
411
464
  | [Close zoom and map tiles](docs/guides/close-zoom.md) | How far each body zooms and why, the finer map tiles for a close zoom (made from public-domain maps, served beside the demo, never in the package), the generic detail, what it costs |
465
+ | [Outside data, the data door](docs/guides/data-door.md) | Hand the package your own maps of a body or small bodies with their licence and credit, switch them off, and show whose data is on the screen |
412
466
  | [Riding along](docs/guides/ride-along.md) | The camera on a moon, a planet or any moving point, looking at what it goes round |
413
467
  | [Accuracy](docs/guides/accuracy.md) | How far each body is from JPL Horizons |
414
468
  | [In your own three.js scene](docs/guides/in-your-own-scene.md) | `painter.make` |
@@ -439,6 +493,7 @@ BODIES.pluto.kind; // "dwarf-planet"
439
493
  - **The planets** (Mercury to Neptune, VSOP87B cut to 995 of its 35,080 terms) are within 5 arc-seconds of Horizons on 60 dates from 1800 to 2200, Mars the worst at 4.8, and the tests hold each to 6 or less; the series is good for the years 1750 to 2250 and slowly worse beyond. Pluto's table is within 0.2.
440
494
  - **The Moon** (ELP2000-82B cut to its 540 largest terms) is within 4.7 arc-seconds on the same 60 dates, held to 5.8.
441
495
  - **The moons** are less exact: Jupiter's four big moons are within 0.15 degree and Saturn's seven inner ones within 2.1, Uranus's Miranda within 3 and Neptune's Nereid within 6.3; one degree on a moon's orbit is about the width of the moon on a screen. [Accuracy](docs/guides/accuracy.md) has each moon's number.
496
+ - **The minor bodies** (Vesta, Pallas, Chiron, Pholus, Halley) are within an arc-second of Horizons in the years their tables cover (Vesta and Pallas 1900 to 2100, the others 1800 to 2200; 0.5 at the worst on the dates checked); outside them they are plain ellipses from Horizons' elements of one epoch, a few degrees off a century away (and Halley's 31 degrees off in 2026 without its table: the space view loads it).
442
497
  - **The dwarf planets** are within 0.2 arc-seconds of Horizons in the years their tables cover (1800 to 2200, Ceres 1900 to 2100); outside them the positions are plain ellipses, good for a few years either side of June 2026. Their moons other than Pluto's are not checked against Horizons, and a dwarf planet's pole is estimated where it is not measured (NOTICE.md says which).
443
498
  - **The spacecraft** follow Horizons' own record, within 1,000 km near a planet and elsewhere a millionth of the distance from the Sun; a path after today is Horizons' prediction, not a fact.
444
499
  - **Star sizes** in the line-up are each from a refereed paper, with the paper's error; WOH G64's and Stephenson 2-18's are estimated (from the spectrum and the brightness, and from a dust-shell fit) and not measured, and UY Scuti's distance is not a parallax. A star's surface (cells, spots, glow) is drawn for looks and says so.
@@ -453,7 +508,7 @@ BODIES.pluto.kind; // "dwarf-planet"
453
508
 
454
509
  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:
455
510
 
456
- > Morris, J. (2026). *Wakusei Planets* (version 0.31.0) [Computer software]. https://github.com/johnmorrisdotca/wakusei-planets
511
+ > Morris, J. (2026). *Wakusei Planets* (version 0.33.0) [Computer software]. https://github.com/johnmorrisdotca/wakusei-planets
457
512
 
458
513
  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).
459
514
 
@@ -8,6 +8,7 @@ import "./uranus.ts";
8
8
  import "./neptune.ts";
9
9
  import "./pluto.ts";
10
10
  import "./dwarfs.ts";
11
+ import "./minor.ts";
11
12
  import "./earth-look.ts";
12
13
  import "./moons-earth.ts";
13
14
  import "./moons-mars.ts";
@@ -8,6 +8,7 @@ import "./uranus.js";
8
8
  import "./neptune.js";
9
9
  import "./pluto.js";
10
10
  import "./dwarfs.js";
11
+ import "./minor.js";
11
12
  import "./earth-look.js";
12
13
  import "./moons-earth.js";
13
14
  import "./moons-mars.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { registerLook } from "../scene/look.js";
2
+ import { rock } from "../scene/recipes.js";
3
+ // The minor bodies, drawn from their numbers: a rock of the body's colour with craters. Vesta has Dawn's own map as its painted look; the others have never been seen as more than a few pixels
4
+ // (Halley's nucleus was photographed by the Giotto probe in 1986, a picture whose terms keep it out of this package), so their craters and patches are made up.
5
+ registerLook({
6
+ id: "vesta",
7
+ surface: rock({ dark: "#7d776d", light: "#bdb6aa", craters: 1.5, contrast: 0.9, seed: 81, patches: 3 }),
8
+ relief: 0.8,
9
+ ambient: 0.02,
10
+ painted: { map: "vesta", widths: [512, 1024, 2048], far: 2048 },
11
+ mapped: true,
12
+ });
13
+ registerLook({ id: "pallas", surface: rock({ dark: "#5e6064", light: "#92949a", craters: 1.2, contrast: 0.8, seed: 83, patches: 2.6 }), relief: 0.7, ambient: 0.02 });
14
+ registerLook({ id: "chiron", surface: rock({ dark: "#6f7073", light: "#a5a6a9", craters: 0.9, contrast: 0.7, seed: 85, patches: 2.4 }), relief: 0.6, ambient: 0.02 });
15
+ registerLook({ id: "pholus", surface: rock({ dark: "#6b3524", light: "#a85c42", craters: 0.9, contrast: 0.7, seed: 87, patches: 2.6 }), relief: 0.6, ambient: 0.02 });
16
+ registerLook({ id: "halley", surface: rock({ dark: "#25221f", light: "#4a4541", craters: 0.8, contrast: 0.9, seed: 89, patches: 3.2 }), relief: 0.9, ambient: 0.02 });
@@ -0,0 +1,3 @@
1
+ import type { MinorId } from "../facts.ts";
2
+ import type { Osculating } from "./dwarf.ts";
3
+ export declare const MINOR_ELEMENTS: Readonly<Record<MinorId, Osculating>>;
@@ -0,0 +1,7 @@
1
+ export const MINOR_ELEMENTS = {
2
+ vesta: { epoch: 1577836800000, a: 2.361908654291772, e: 0.08857261385730482, i: 7.14181494423702, node: 103.8092892453337, w: 150.8357762126256, m: 163.3754032354997, n: 0.271524753 },
3
+ pallas: { epoch: 1493251200000, a: 2.773023116113918, e: 0.2306545322740501, i: 34.83970334384021, node: 173.0883296888898, w: 309.9974922427895, m: 263.9040941962388, n: 0.21343903 },
4
+ chiron: { epoch: 1497225600000, a: 13.64597936638133, e: 0.3824171374703196, i: 6.94959060447848, node: 209.2011323125998, w: 339.6529896907077, m: 151.975605480683, n: 0.019552262 },
5
+ pholus: { epoch: 1277164800000, a: 20.30484241567553, e: 0.5718479422462566, i: 24.66709981611229, node: 119.4098618882261, w: 354.7063272595453, m: 73.88199769909997, n: 0.010772206 },
6
+ halley: { epoch: -61516800000, a: 17.92863504856929, e: 0.9679359956953212, i: 162.1905300439129, node: 59.09894720612437, w: 112.2414314637764, m: 274.3823371364693, n: 0.012983244 },
7
+ };
@@ -2,15 +2,17 @@
2
2
  export interface FittedTable {
3
3
  /** Milliseconds since 1970, in terrestrial time, at the start of the first segment. */
4
4
  start: number;
5
- /** The length of a segment in milliseconds. */
5
+ /** The length of a segment in milliseconds (the mean length, for a table with `edges`). */
6
6
  segment: number;
7
+ /** Where each segment starts, in milliseconds from `start`, and where the last ends: one more than there are segments. Left out, every segment is `segment` long; a body that moves fast in one part of its orbit and slowly in another (a comet) has segments of unequal length. */
8
+ edges?: readonly number[];
7
9
  /** The error on samples held back from the fit, in arc-seconds. */
8
10
  worst: number;
9
11
  /** By segment, then x, y, z, then the Chebyshev coefficients, in au. */
10
12
  segments: readonly (readonly (readonly number[])[])[];
11
13
  }
12
14
  /**
13
- * Teach `heliocentric` a body's fitted table. The entry points `@johnmorrisdotca/wakusei-planets/tables/ceres` and `/tables/dwarfs` call this as they load.
15
+ * Teach `heliocentric` a body's fitted table. The entry points `@johnmorrisdotca/wakusei-planets/tables/ceres`, `/tables/dwarfs` and `/tables/minor` call this as they load.
14
16
  *
15
17
  * @param id - The body's name.
16
18
  * @param table - Its Chebyshev segments, as `scripts/make-dwarf-data.py` writes them.
@@ -3,7 +3,7 @@
3
3
  const KEY = Symbol.for("johnmorrisdotca.wakusei-planets.tables");
4
4
  const tables = (globalThis[KEY] ??= new Map());
5
5
  /**
6
- * Teach `heliocentric` a body's fitted table. The entry points `@johnmorrisdotca/wakusei-planets/tables/ceres` and `/tables/dwarfs` call this as they load.
6
+ * Teach `heliocentric` a body's fitted table. The entry points `@johnmorrisdotca/wakusei-planets/tables/ceres`, `/tables/dwarfs` and `/tables/minor` call this as they load.
7
7
  *
8
8
  * @param id - The body's name.
9
9
  * @param table - Its Chebyshev segments, as `scripts/make-dwarf-data.py` writes them.