@johnmorrisdotca/wakusei-planets 0.28.0 → 0.31.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.
- package/CHANGELOG.md +30 -0
- package/NOTICE.md +20 -0
- package/README.md +61 -16
- package/dist/embed.d.ts +64 -0
- package/dist/embed.js +66 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- package/dist/lineup/data.d.ts +160 -0
- package/dist/lineup/data.js +303 -0
- package/dist/lineup/element.d.ts +99 -0
- package/dist/lineup/element.js +782 -0
- package/dist/lineup/labels.d.ts +141 -0
- package/dist/lineup/labels.js +155 -0
- package/dist/lineup/layout.d.ts +174 -0
- package/dist/lineup/layout.js +162 -0
- package/dist/lineup/scene3d.d.ts +47 -0
- package/dist/lineup/scene3d.js +155 -0
- package/dist/portrait/element.d.ts +5 -2
- package/dist/portrait/element.js +57 -6
- package/dist/portrait/scene3d.d.ts +13 -0
- package/dist/portrait/scene3d.js +21 -2
- package/dist/scene/body.d.ts +3 -1
- package/dist/scene/body.js +2 -1
- package/dist/scene/detail.d.ts +8 -2
- package/dist/scene/detail.js +56 -28
- package/dist/scene/painter.d.ts +32 -0
- package/dist/scene/painter.js +94 -10
- package/dist/scene/textures.d.ts +4 -2
- package/dist/scene/textures.js +2 -0
- package/dist/scene/tiles.d.ts +46 -0
- package/dist/scene/tiles.js +165 -19
- package/dist/space/arrows.d.ts +87 -0
- package/dist/space/arrows.js +117 -0
- package/dist/space/beside.d.ts +74 -0
- package/dist/space/beside.js +76 -0
- package/dist/space/bodies.d.ts +83 -0
- package/dist/space/bodies.js +93 -0
- package/dist/space/clock.d.ts +31 -0
- package/dist/space/clock.js +45 -0
- package/dist/space/element.d.ts +98 -15
- package/dist/space/element.js +320 -63
- package/dist/space/frame.d.ts +45 -2
- package/dist/space/frame.js +56 -4
- package/dist/space/index.d.ts +6 -1
- package/dist/space/index.js +6 -1
- package/dist/space/labels.d.ts +52 -0
- package/dist/space/labels.js +40 -0
- package/dist/space/scale.d.ts +5 -5
- package/dist/space/scale.js +10 -4
- package/dist/space/scene.d.ts +50 -9
- package/dist/space/scene.js +313 -36
- package/dist/space/spin.d.ts +37 -0
- package/dist/space/spin.js +29 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.31.0] - 2026-11-10
|
|
6
|
+
|
|
7
|
+
- **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.
|
|
8
|
+
- **Arrows on an orbit show which way the body goes, and the help mode shows its spin** (MODULES-857). With `orbits` on, six arrowheads about nine CSS pixels long sit along each orbit line (the Moon's too), pointing the way the body goes round; they keep their pixel size at every zoom, stay clear of the body, and show the real direction of travel, so they do not turn round when the clock runs backwards. `help` (new attribute and property, off by default) draws, on the body looked at, the line of its axis and a curved arrow round it for the way it spins, by the right-hand rule about the axis it really turns about (`spinAxis(id, ms)`, from its prime meridian's motion): the north pole for the Earth, the opposite way about the pole for Venus and Uranus, the way it goes round for a moon that keeps one face to its planet. `arrowSites`, `chevron`, `spinArrow`, `spinAxis` and `ARROWS_PER_ORBIT` are new in `/space`; `stats.arrows`, `stats.arrowPx` and `stats.help` read what was drawn. The three.js parts the view needs now include `LineSegments` (a page's own `setThreeLoader` subset adds it; the demo's does). The demo's Help switch turns the help mode on.
|
|
9
|
+
- **The space view offers every body the package knows: the dwarf planets are placed, and every moon can be gone to and ridden** (MODULES-741). `SPACE_BODIES` is now the nineteen bodies the view places (it was eleven): the Earth, the Sun, the Moon, the seven other planets, Pluto and the eight other dwarf planets, which `frameAt` gives in `frame.dwarfs` (new) from their osculating elements; `placeBodies`, `radiusIn` (a dwarf planet is its real size, or 0.3 Earth radii when compressed, whichever is larger), `moonDistance` and `planetOrbit` take them, `SPACE_DWARFS` and `SpaceDwarf` are new in `/space`, and `orbits` draws their lines, each body on its own. The moons of Orcus, Haumea and Eris are placed and drawn like those of the planets, `zoomFor` has `orcus-moons`, `haumea-moons` and `eris-moons` beside the planets', and every body of the 47 can be at the middle, gone to, hopped to and ridden. A dwarf planet under half a pixel across its radius is named and ringed but not drawn or made. The demo's picker is a kind, for a moon its planet, then the body, with a search by name and a "With its moons" button. `stats.bodies.painted` counts the dwarf planets made, so it can be above eleven.
|
|
10
|
+
- **Every planet and moon of the space view shows its real picture in every look** (MODULES-850, MODULES-809). The painter's context takes `mapped: true`: every body that has a surface map is drawn from it, whatever the look. `<wakusei-space>` passes it, so the realistic look, its default, draws Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, the Moon and the moons that have maps from their pictures (it was the Earth alone) and the finer map tiles reach Mars and the Moon in it as they do in the painted look (MODULES-809); a body with no picture (Phobos, Deimos, Uranus's moons) is still shaded. The portrait and the single body are unchanged.
|
|
11
|
+
- **A view from beside the Moon with the Earth still in view** (MODULES-854). `space.ride("moon", { view: "beside" })`, and the same for any moon of a planet (`"io"`), puts the camera beyond the moon and off the line to its planet: the moon large in the foreground (about 20 degrees across its radius), the planet in view behind it at its real angular size (the Earth about two degrees from the Moon in the true scale) and never hidden by the moon, with a glide there and back. The camera opens off the line until the two discs clear each other, sits on the Sun's side where it can, turns the picture so the planet is beside the moon, and widens the field of view to fit the narrower side of the view; yaw swings it round the line, tilt opens the angle and zoom goes closer. `besideMoon(input)` and `BESIDE_RADII` (new, `/space`) are the pure maths. A planet or a point of your own with `view: "beside"` is refused. The demo's Ride along row has it as "Beside the Moon".
|
|
12
|
+
- **Any body can be at the middle of the space view, a press selects and a second press goes there, and a hopper goes through the bodies** (MODULES-858). `space.body` takes any body of the view by name in any case, in English or Japanese, including the moons of the planets (`titan`); `space.goTo(name, { smooth, zoom })` glides there and brings it whole into view. A first press selects (`wakusei-body-select`, `space.selected`) and a second goes there; a press never sends the view back to the Earth. `space.next()`, `previous()`, `hopper`, `bodyList()` and the `wakusei-hop` event give the order Sun, Mercury, Venus, Earth, Moon, Mars, Phobos, Deimos, Jupiter and its moons, and on; `HOP_ORDER`, `findBody`, `hopFrom`, `hostOf` and `bodyKindOf` are new in `/space`; `BodyInfo` gains `kind` and `host`. The names of a planet's moons are shown and placed (`placeOf`) once they are drawn. A test checks that `body = "Saturn"`, in any case, puts Saturn at the middle; `zoomFor` takes a preset in any case, and gives 1 for a name that is no preset (it gave NaN, or threw, for a capital: very likely why the prototype's `body = "Saturn"` with `zoomFor("Saturn-moons")` left the view on the Earth, since `body` itself always took the name in any case).
|
|
13
|
+
- **`<wakusei-space>` works full screen** (MODULES-848). `immersive` (new attribute and property) makes the element fill its box in any shape, a plain wheel zoom and a drag anywhere (a touch drag too) turn it, as the home page prototype needed; without it kazoku-ui's rules stand (Ctrl, Command or Alt with the wheel zooms, the plain wheel scrolls the page). At zoom 1 the body looked at is framed by the shorter side of the view in any shape, so it is never cut off, and Saturn is framed with its rings (2.4 radii across). A browser test (`fill-frame.demo.ts`) holds the space view, the portrait and the line-up of the demo to fill their frame edge to edge, canvas included, to within a pixel, at 1440, 390 and a wide short window. The demo has the page `space-full.html`, and `checkGestures` passes on it (the plain wheel's pan is named as the one gesture it lacks, because there the plain wheel zooms).
|
|
14
|
+
- **The Moon's orbit round the Earth is drawn, and every body is checked to sit on its own line** (MODULES-852). With `orbits` on, the view draws the Moon's path round the Earth (`moonOrbit(ms)`, new in `/space`: one sidereal month from the Moon's own place, closed, worked out again every five days of the clock) beside the Earth's and the planets' round the Sun, through the same mapping as the bodies in both scales. `stats.orbits` (new) lists the lines drawn and how far each body is from its own, as a fraction of the line's radius.
|
|
15
|
+
- **No two names of the space view overlap** (MODULES-855). The names of the bodies are chosen by rank (the body looked at, the Sun, the planets, the Moon) and one that would cover a surer one is left out, with its ring: a moon gives way to its planet and a planet to the Sun, and zooming in brings the names back. `chooseLabels(boxes)` and `LABEL_GAP` (new, `/space`) are the rule on plain boxes.
|
|
16
|
+
- **The space view opens at true distances, and says so** (MODULES-856). `scale` is `true` by default (it was `compressed`); the scale in use is named on the view itself ("True distances" or "Distances squeezed to fit", in the element's `lang`, with `scaleNames` for a page's own words and `::part(scale)` to style the line); a body whose disc is under 4 CSS pixels across its radius is marked with a ring as well as its name; and in the compressed scale the Moon is drawn at its true 0.273 of the Earth (it was 0.9, nearly as big as the Earth). A page that relied on the old default writes `scale="compressed"`. `space.placeOf(id)` (new) says where a body is on the screen.
|
|
17
|
+
|
|
18
|
+
## [0.30.0] - 2026-11-10
|
|
19
|
+
|
|
20
|
+
- **The portrait and the space view zoom to their bodies' detail, with the finer map tiles** (MODULES-773). The painter, which draws every body of `<wakusei-portrait>` and `<wakusei-space>`, now takes the tiles, the window and the zoom table that `<wakusei-body>` got in 0.27.0. `PaintInfo.view` (new, optional: the camera and the size of its view in CSS pixels) lets a body work out which part of its surface the camera sees (`seenRegion`: rays through a grid of the view and round the edge of the near side, met with the body in its own frame, for an orthographic camera and a perspective one alike); a body whose disc is 150 device pixels across its radius or more, once the 2048 pixel map is not sharp enough, reads the tile set and lays the window over its map. `createPainter({ tiles })` says where the tiles are (`off` for none; the demo site's by default unless `textureBase` is given), `PaintContext.onLevels` is told what levels a body has, and `Painting.tiles` says what the window is doing. A caller that gives no `view` (chikyu-earth's space view) draws as it always did. Bodies that are not glowing take the generic detail in the painter's shader too, as in `<wakusei-body>`.
|
|
21
|
+
- **The portrait's zoom range follows its bodies** (MODULES-773). A shaded portrait goes as far as its farthest-reaching body (the table of `scene/reach.ts`, each body measured in the radii its picture reaches from the middle of the short side of the view at Fit, on its finest tile level once the tiles are found): 8x at least, 1000x at most, as before 0.1x at the least. A line portrait stays at 8x, and so does a scene of bodies with no finer maps. `stats.tiles` and `stats.zoomMax` say what it is doing. The `tiles` attribute (new on `<wakusei-portrait>` and `<wakusei-space>`; `off` for none) names the tile folder, the demo's embed page and space page set it.
|
|
22
|
+
- **The space view's ceiling stays at 3x** (MODULES-773). The camera is held 1.05 radii from the surface, and at 3x, 0.13 radii above the ground, a texel of the finest tiles of the Earth, Mars and the Moon is about two pixels wide in a view 420 pixels high, which is where the zoom table says their detail runs out: the table gives the space view no further to go. What changes is the picture at 3x: the level 3 tiles (four to nine of them on a view as wide as the demo's) at their own size, where the 2048 pixel map was enlarged eight times. The tiles are used where a body is drawn from its map: the Earth in both looks, Mars and the Moon in the `painted` look. A far view reads no tile set and no tile. `stats.tiles` of the space view adds up its bodies' windows.
|
|
23
|
+
- **Tests** (MODULES-773). `seenRegion` against the box it replaces and against a pinhole camera; the painter with a camera, in Node, with a faked network; the portrait and the space view in a browser with the made-up tile set (what is fetched and how often, which level is on the body, nothing fetched far away, nothing drawn at rest, what the window took given back) and in the freeze test; the star presets.
|
|
24
|
+
- **The star page's presets are the size line-up's rows** (MODULES-795). Sirius A, Betelgeuse, Rigel and Vega on the star page now read `LINEUP_STARS`, so the two pages agree: Betelgeuse 1,057 Suns (the measured angle at 222 pc, 3,650 K), Sirius A 1.7144 (9,845 K) and Vega 2.726 equatorial (9,660 K, flattening 0.113, turning in 0.71 days). They were 764 (Joyce et al. 2020, a value from stellar models that the line-up names and does not use), 1.711 and 2.362. The README, the star-look guide (English and Japanese) and the examples that named those numbers use the line-up's. The size line-up guide no longer says the star page's preset is the model value.
|
|
25
|
+
|
|
26
|
+
## [0.29.0] - 2026-11-10
|
|
27
|
+
|
|
28
|
+
- **Time keeps up on slow machines** (MODULES-797). `<wakusei-space>`'s clock now lives in `createGameClock` (`src/space/clock.ts`, internal): it advances by the time the page's clock says passed, never by a frame, so 86400x is a day for every real second whether the machine draws 60 frames a second or 5 (a unit test with a 5-frames-a-second clock moves 2 days in 2 s within 1 percent). There is no cap on a long gap: a tab that was hidden or a laptop that slept finds the date where the speed would have taken it. Three faults found on the way: the `time` property and `stats.time` read the moment of the last step, up to a long draw old, and now read the moment now; a picture drawn late showed the moment of the last step and now shows the moment it is drawn at; and starting, switching or stopping a ride dropped the time since the last step (up to a minute at real time on a held date). The speed, Pause, Back and the `wakusei-timechange` events are as they were. The date-play test times the clock against the page's own clock again.
|
|
29
|
+
- **Three browser tests that failed on a Mac are fixed, in the tests** (MODULES-788, MODULES-775). The space view's "paused, nothing is drawn" test began 600 ms after the page was live, and the Earth's finer map (1024 pixels, after the 512 one) arrives later on a busy machine and draws one frame when it does: 39 to 52 draw calls, the same each time, reproduced by holding that file back 1.8 s. It now waits for the map and for the view to be quiet, and the limit (no draw in 4 seconds) is as it was. "The view can be moved sideways and rolled" and the embed panel's "picture fits its box" both waited a fixed time (800 ms, 150 ms) for a frame, and on a busy Mac the next frame can be seconds away: they now wait for the frame that draws the change (the draw counter moves past its value at the change; the panel's layout fits), and the limits (1 pixel, half a pixel) are as they were. The reduced-motion ride test (a ride runs at about one step a second) divided its draws by 4 seconds although a busy machine takes longer between the two reads, and counted the frame of a late Earth map: it now counts over the real time between the reads, taken with the page's clock, and waits for the map; the element's step rate (one a second) does not drift, and the limit (1.6 a second) is as it was. The date-play tests that read the date box (a ride "keeps moving", Play moves the date on, the body page's day) waited a fixed 1.5 to 2.2 s for the box, which is written from the element's events and can be held back a second or two by a long draw: they now wait for the box to reach the later date (15 s at most), the dates asked for as they were. The space view's tests no longer run as a serial group, so one failure no longer hides the 21 after it.
|
|
30
|
+
|
|
5
31
|
## [0.28.0] - 2026-11-09
|
|
6
32
|
|
|
7
33
|
- **The date follows the clock, and Play runs it** (MODULES-759, MODULES-755 wakusei part). John, on the space page: "The date is never reflected by the action in the page" and "Where are the Play controls to see the planets rotate starting from the Date and time selected?" `<wakusei-space>` and `<wakusei-body>` (with a `time` or `moons`) send `wakusei-timechange` with `{ time, running }`: four times a second at most while time runs (once a second at real time; only while the tab is shown), and once with `running: false` when the clock holds. `<wakusei-body>` has a `time` property (the moment shown). A held clock (`rate="0"`) is not "moving" any more, so it draws nothing. In the demo the date box follows the clock (never while the reader is typing in it), a ride along (the Moon, Io) starts the clock, and the loose Speed row is kazoku-ui's `<kazoku-replay-bar>` on the space page and the body page: Play runs the clock from the date shown, Pause holds it, Back returns to the date chosen, and `play=on`, `speed` and the date (`t`, when the clock stops or the reader leaves) stay in the address. Reduced motion leaves Play off. An old address with `speed` alone is paused now (add `play=on`); the speed starts at 3600 (an hour a second). The body page's real sky no longer adds the portrait turn to a dated picture (it turned 12 degrees a second even when held); Play is what moves it. `wakusei-time` is unchanged.
|
|
8
34
|
- **kazoku-ui 0.27 (with 0.26): a plain drag always turns, lighter sheets for children, and the shared renderer draws at most 30 frames a second** (MODULES-743). On the space view and the views that turn, a plain drag (and one finger) now turns at every zoom; the middle or right button, Ctrl or Command and a drag, Space and a drag, and the wheel move; the Move or Turn choice is gone (`initial: { drag: "turn" }` is no longer asked of the shared controls). The colouring sheets draw their outline at kazoku-ui's kid line, 1.2 mm (was 3), and the lines inside at 1 mm (was 2.5), so a sheet is lighter and the names have room.
|
|
35
|
+
- **A size line-up of stars in 3D** (MODULES-722). `<wakusei-lineup>` (entry point `/lineup`) puts the Sun, Sirius A, Vega, Arcturus, Aldebaran, Rigel, Antares, Betelgeuse and the largest stars known (VY Canis Majoris, WOH G64, UY Scuti, Stephenson 2-18) side by side or one above the next at true relative size, each drawn with the star look and labelled with its radius in Suns and kilometres, its error and its source, in English and Japanese. A slider zooms smoothly (a logarithmic scale of radius, the camera resting on each body) from the smallest body up to the largest, from the Earth and Jupiter (`planets`) or the Sun; each star turns slowly and a drag turns the one it takes hold of; ring markers show a body too small to see. All the bodies are in one three.js scene on the shared renderer (one WebGL context, nothing drawn at rest or out of sight, no frame cap of its own, a freeze test in `e2e/lineup-freeze.demo.ts`). Attributes `stars`, `planets`, `layout`, `zoom`, `at`, `turn`, `look`, `labels`, `controls`, `size`, `lang`, `quality`, `live`; methods `zoomTo`, `turnBy`, `resetTurns`, `picture`, `toSvg`, `toPng`; the `wakusei-lineup-zoom` event.
|
|
36
|
+
- **The radii are a typed table with a paper for each row** (MODULES-722). `LINEUP_STARS` holds each star's radius with its error below and above, the method, the angular diameter, the ADS bibcodes and the date read; `basis` says how well a size is known (defined, measured angle and distance, measured angle with a distance that is not a parallax, or from brightness and temperature) and the label says *estimated* for the last two. The tests check each radius against the distance its paper adopted. Betelgeuse is 1,057 (+228, -162) Suns, the measured angle at the distance of Harper et al. 2017; the 764 of Joyce et al. 2020 is from stellar models and is named and not used. UY Scuti is 1,708 (±192) Suns, the measured angle at the paper's old distance, with the revised 909 (photometry and a Gaia distance) named and not used. WOH G64 and Stephenson 2-18 have no measured angular diameter. Nothing is taken from an infographic, Wikipedia's text or the Gaia, Hipparcos and Tycho catalogues; `NOTICE.md` lists every source and each disagreement.
|
|
37
|
+
- **The pure side** (MODULES-722): `lineupBodies`, `placeLineup`, `lineupView`, `lineupZoomOf`, `lineupFocus`, `lineupProject`, `lineupText`, `lineupKm`, `lineupLabels`, `lineupLabelsSvg`, `lineupCode` and `lineupCredit`.
|
|
38
|
+
- **The demo's size line-up page and its embed** (MODULES-722). `lineup.html` has its choices in rows of clicks kept in the address (stars, planets, layout, turning, a button for each body), a card for the body in frame with its radius, method, papers and where they disagree, "Save as an image" (kazoku-ui's `saveImage`, PNG and SVG) and "Print as a poster" (kazoku-ui's print part, A4 and US Letter, landscape, a QR code back to the page), and "Put it in your page" for all seven ways. The embed page takes `?lineup=1`. A guide in both languages, `docs/guides/size-lineup.md`, holds every tested example word for word (`pnpm test:usage` builds and opens each).
|
|
9
39
|
|
|
10
40
|
## [0.27.0] - 2026-11-09
|
|
11
41
|
|
package/NOTICE.md
CHANGED
|
@@ -39,6 +39,26 @@ Voyager 1 and 2, New Horizons, Pioneer 10 and 11, Cassini, Galileo, Juno, Parker
|
|
|
39
39
|
- **Facts and events**: NASA mission pages, read 2026-11-08: Voyager 1 (https://science.nasa.gov/mission/voyager/voyager-1/), Voyager 2 (https://science.nasa.gov/mission/voyager/voyager-2/), New Horizons (https://science.nasa.gov/mission/new-horizons/), Pioneer 10 (https://science.nasa.gov/mission/pioneer-10/), Pioneer 11 (https://science.nasa.gov/mission/pioneer-11/), Cassini (https://science.nasa.gov/mission/cassini/ and its timeline, https://science.nasa.gov/mission/cassini/the-journey/timeline/), Galileo (https://science.nasa.gov/mission/galileo/), Juno (https://science.nasa.gov/mission/juno/ and the NSSDCA record 2011-040A, https://nssdc.gsfc.nasa.gov/nmc/spacecraft/display.action?id=2011-040A), Parker Solar Probe (https://science.nasa.gov/mission/parker-solar-probe/ and the NSSDCA record 2018-065A, https://nssdc.gsfc.nasa.gov/nmc/spacecraft/display.action?id=2018-065A) and the James Webb Space Telescope (https://science.nasa.gov/mission/webb/ and https://science.nasa.gov/mission/webb/launch/). A time is given only where a page gives one. Where a page's date for a flyby disagrees with the closest approach of Horizons' path, the package keeps the date of the path (listed in the guide).
|
|
40
40
|
- **Japanese names** are the usual Japanese spellings of the missions' names.
|
|
41
41
|
|
|
42
|
+
## The size line-up's radii
|
|
43
|
+
|
|
44
|
+
The twelve stars of `<wakusei-lineup>` (`src/lineup/data.ts`, `LINEUP_STARS`). Every radius and temperature was typed from a refereed paper (the abstract and the tables, on arXiv and in the journal's own record, read on 2026-11-09); the papers are credited and none of their text, figures or tables is copied. Facts are not copyrightable. A radius is an angular diameter that was measured (interferometry where it exists) times a distance, or, where the row says so, a radius worked out from brightness. Nothing is taken from an infographic, from Wikipedia's text, or from the catalogues of Hipparcos, Gaia or Tycho (ESA, CC BY-NC 3.0 IGO): where a paper's distance is a catalogue parallax (Vega, Arcturus, Aldebaran, Rigel, Antares), only the paper's published radius and angle are typed here, never the parallax. Each ADS bibcode below opens the paper at https://ui.adsabs.harvard.edu/abs/<bibcode>/abstract.
|
|
45
|
+
|
|
46
|
+
- **The Sun**: the IAU's nominal radius, 695,700 km, and effective temperature, 5,772 K: I. Prša et al. (2016), "Nominal values for selected solar and planetary quantities: IAU 2015 Resolution B3", AJ 152, 41 (2016AJ....152...41P).
|
|
47
|
+
- **Sirius A**: radius 1.7144 ± 0.0090 Suns and 9,845 K, H. E. Bond et al. (2017), "The Sirius System and its Astrophysical Puzzles", ApJ 840, 70 (2017ApJ...840...70B), from the angular diameter 6.048 ± 0.040 mas of J. Davis et al. (2011), "The Angular Diameter and Fundamental Parameters of Sirius A", PASA 28, 58 (2011PASA...28...58D).
|
|
48
|
+
- **Vega**: equatorial radius 2.726 ± 0.006 Suns, polar radius 2.418, apparent temperature 9,660 K and rotation period 0.71 days, J. D. Monnier et al. (2012), "Resolving Vega and the inclination controversy with CHARA/MIRC", ApJ 761, L3 (2012ApJ...761L...3M).
|
|
49
|
+
- **Arcturus**: 25.4 ± 0.2 Suns and 4,286 K, I. Ramírez and C. Allende Prieto (2011), "Fundamental Parameters and Chemical Composition of Arcturus", ApJ 743, 135 (2011ApJ...743..135R), from the weighted mean of the interferometric angular diameters, 21.06 ± 0.17 mas.
|
|
50
|
+
- **Aldebaran**: 44.2 ± 0.9 Suns, a limb-darkened diameter of 20.58 ± 0.03 mas, and 3,934 K, A. Richichi and V. Roccatagliata (2005), "Aldebaran's angular diameter: how well do we know it?", A&A 433, 305 (2005A&A...433..305R).
|
|
51
|
+
- **Rigel**: 78.9 ± 7.4 Suns from the limb-darkened diameter 2.75 ± 0.01 mas (Aufdenberg et al. 2008) and 12,100 K (Przybilla et al. 2010), as listed by E. Moravveji et al. (2012), "Asteroseismology of the Nearby SN-II Progenitor: Rigel Part I", ApJ 747, 108 (2012ApJ...747..108M).
|
|
52
|
+
- **Antares**: 680 Suns from the limb-darkened diameter 37.38 ± 0.06 mas, and 3,660 K, K. Ohnaka et al. (2013), "High spectral resolution imaging of the dynamical atmosphere of the red supergiant Antares in the CO first overtone lines with VLTI/AMBER", A&A 555, A24 (2013A&A...555A..24O). The error (-99, +139) is worked out here from the 17 percent error of the parallax the paper uses.
|
|
53
|
+
- **Betelgeuse**: the limb-darkened diameter 44.28 ± 0.15 mas, X. Haubois et al. (2009), "Imaging the spotty surface of Betelgeuse in the H band", A&A 508, 923 (2009A&A...508..923H), and the distance 222 (+48, -34) pc, G. M. Harper et al. (2017), "An Updated 2017 Astrometric Solution for Betelgeuse", AJ 154, 11 (2017AJ....154...11H); the radius, 1,057 (+228, -162) Suns, is half the angle times the distance, worked out here. 3,650 K: E. M. Levesque et al. (2005), "The Effective Temperature Scale of Galactic Red Supergiants: Cool, But Not As Cool As We Thought", ApJ 628, 973 (2005ApJ...628..973L). Not used: the 764 Suns of M. Joyce et al. (2020), ApJ 902, 63 (2020ApJ...902...63J), which come from stellar models.
|
|
54
|
+
- **VY Canis Majoris**: 1,420 ± 120 Suns from the Rosseland angular diameter 11.3 ± 0.3 mas at 1.17 ± 0.08 kpc, and 3,490 K, M. Wittkowski et al. (2012), "Fundamental properties and atmospheric structure of the red supergiant VY CMa based on VLTI/AMBER spectro-interferometry", A&A 540, L12 (2012A&A...540L..12W); the distance is the mean of the radio parallaxes of Choi et al. (2008) and B. Zhang et al. (2012), ApJ 744, 23 (2012ApJ...744...23Z).
|
|
55
|
+
- **WOH G64**: 1,540 Suns (an error of 5 percent) and 3,400 ± 25 K, from the spectrum and the brightness at the Large Magellanic Cloud's 50 kpc, E. M. Levesque et al. (2009), "The Physical Properties of the Red Supergiant WOH G64: The Largest Star Known?", AJ 137, 4744 (2009AJ....137.4744L). No angular diameter of the star itself has been measured. Named and not used: 1,730 Suns from a dust model, K. Ohnaka et al. (2008), A&A 484, 371 (2008A&A...484..371O); the star changed between 2009 and 2016, K. Ohnaka et al. (2024), A&A 691, L15 (2024A&A...691L..15O).
|
|
56
|
+
- **UY Scuti**: 1,708 ± 192 Suns from the Rosseland angular diameter 5.48 ± 0.10 mas and 3,365 K, B. Arroyo-Torres et al. (2013), "The atmospheric structure and fundamental parameters of the red supergiants AH Sco, UY Sct and KW Sgr", A&A 554, A76 (2013A&A...554A..76A). The distance of about 2.9 kpc is an old estimate and not a parallax, so the size is marked estimated. Named and not used: 909 Suns, from photometry and a Gaia distance, S. Healy et al. (2024), "Red Supergiant Candidates for Multimessenger Monitoring of the Next Galactic Supernova", MNRAS 529, 3630 (Gaia's value is not copied).
|
|
57
|
+
- **Stephenson 2-18**: 3,200 K and log L = 5.64 (at 5.5 kpc) from a dust-shell fit, T. K. T. Fok et al. (2012), "Maser Observations of Westerlund 1 and Comprehensive Considerations on Maser Properties of Red Supergiants Associated with Massive Clusters", ApJ 760, 65 (2012ApJ...760...65F); the distance is the cluster's kinematic one, S. Deguchi et al. (2010), PASJ 62, 391 (2010PASJ...62..391D), with the range 5.83 (+1.91, -0.78) kpc of B. Davies et al. (2007), ApJ 671, 781 (2007ApJ...671..781D). The radius, 2,150 (+710, -290) Suns, is worked out here by the Stefan-Boltzmann law (the error is the distance's alone). No angular diameter has been measured.
|
|
58
|
+
- **The Earth and Jupiter** beside them are the package's own facts: equatorial radii 6,378.137 km and 71,492 km, IAU and NASA (above).
|
|
59
|
+
|
|
60
|
+
The star's look (the cells, the spots, the glow) is invented to look right and says so; only the temperature, the radius and the class are the papers'.
|
|
61
|
+
|
|
42
62
|
## The Earth
|
|
43
63
|
|
|
44
64
|
The Earth's line drawing is chikyu-earth's own globe (MIT, by John Morris; https://github.com/johnmorrisdotca/chikyu-earth), an optional peer dependency: its own NOTICE.md has the terms of its outlines. The Earth's realistic and painted looks are drawn here, like every other body, from NASA's Blue Marble picture (below).
|
package/README.md
CHANGED
|
@@ -15,9 +15,33 @@ A clean line drawing, a shaded realistic drawing, or a painted surface map, with
|
|
|
15
15
|
|
|
16
16
|
<p align="center"><a href="https://johnmorrisdotca.github.io/wakusei-planets/"><strong>Open the demo →</strong></a> · <a href="https://johnmorrisdotca.github.io/wakusei-planets/embed.html">Embed page</a> · <a href="https://johnmorrisdotca.github.io/wakusei-planets/docs/">Docs</a></p>
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Wakusei Planets runs in the browser of a phone, a tablet or a computer: nothing to install, no account, and it is free.
|
|
19
19
|
|
|
20
|
-
<p align="center"><img alt="
|
|
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
|
+
|
|
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>
|
|
23
|
+
|
|
24
|
+
## Who it is for
|
|
25
|
+
|
|
26
|
+
- **Teachers and students:** [the size line-up](https://johnmorrisdotca.github.io/wakusei-planets/lineup.html) puts the Sun and the largest stars side by side at true relative size, each with its radius, its error and its paper, and [colouring sheets](https://johnmorrisdotca.github.io/wakusei-planets/kids.html) of the Sun, the planets and the big moons print on A4 or US Letter in English and Japanese, with the real colours and three facts each.
|
|
27
|
+
- **Space enthusiasts:** [the space view](https://johnmorrisdotca.github.io/wakusei-planets/space.html) puts the Earth, the Moon, the Sun and the planets where they are now, or on any date you set, and zooms out to the whole solar system; [Jupiter and its moons as the Earth sees them now](https://johnmorrisdotca.github.io/wakusei-planets/?body=jupiter&sky=real&moons=1) is one click. The ten famous spacecraft (Voyager 1 and 2, New Horizons, Cassini, Juno, the Webb telescope and the rest) and where each is on any date are in [the spacecraft guide](https://johnmorrisdotca.github.io/wakusei-planets/docs/guides/spacecraft.html): that is code and a table, and there is no demo page for it yet.
|
|
28
|
+
- **Researchers and outreach staff:** every planet and the Moon is held within 6 arc-seconds of NASA's JPL Horizons on 60 dates from 1800 to 2200, and Jupiter's four big moons within 0.15 degree; [the accuracy guide](https://johnmorrisdotca.github.io/wakusei-planets/docs/guides/accuracy.html) gives each body's number and [NOTICE.md](NOTICE.md) names every source. The tables download as CSV and Parquet ([data files](https://johnmorrisdotca.github.io/wakusei-planets/docs/guides/data-files.html)). Read [Limits](#limits) first, and see [How to cite](#how-to-cite).
|
|
29
|
+
- **Writers, museums and site owners:** [the code builder](https://johnmorrisdotca.github.io/wakusei-planets/builder.html) and [the portrait builder](https://johnmorrisdotca.github.io/wakusei-planets/portrait.html) write the code that puts a body, or a picture of several, in your page as an `<iframe>` or a tag, with no build step.
|
|
30
|
+
- **Developers:** one `<wakusei-body>` tag, an SVG string with no browser at all, and typed data for the sizes, tilts, poles and places, and the bodies as objects for a three.js scene of your own; [One minute](#one-minute) and the [API](#api) are below.
|
|
31
|
+
|
|
32
|
+
## Try it now, nothing to install
|
|
33
|
+
|
|
34
|
+
**Learn:** **[Colouring sheets to print](https://johnmorrisdotca.github.io/wakusei-planets/kids.html)** · **[Saturn's sheet](https://johnmorrisdotca.github.io/wakusei-planets/kids.html?sheet=saturn)** · **[The size line-up, the Sun to the largest stars](https://johnmorrisdotca.github.io/wakusei-planets/lineup.html)**
|
|
35
|
+
|
|
36
|
+
**Look:** **[Saturn, painted](https://johnmorrisdotca.github.io/wakusei-planets/?body=saturn&look=painted)** · **[Jupiter and its moons now](https://johnmorrisdotca.github.io/wakusei-planets/?body=jupiter&sky=real&moons=1)** · **[The space view](https://johnmorrisdotca.github.io/wakusei-planets/space.html)** · **[A star from its numbers: Vega](https://johnmorrisdotca.github.io/wakusei-planets/star.html?star=vega)**
|
|
37
|
+
|
|
38
|
+
**Make:** **[The portrait builder](https://johnmorrisdotca.github.io/wakusei-planets/portrait.html)** · **[The code builder](https://johnmorrisdotca.github.io/wakusei-planets/builder.html)**
|
|
39
|
+
|
|
40
|
+
**Language:** **[日本語](https://johnmorrisdotca.github.io/wakusei-planets/?lang=ja)** · **[English](https://johnmorrisdotca.github.io/wakusei-planets/?lang=en)**
|
|
41
|
+
|
|
42
|
+
## For teachers and families
|
|
43
|
+
|
|
44
|
+
Wakusei Planets works on a phone or a tablet as well as on a computer, in the browser, and it is free: the code is MIT-licensed, and nothing is installed or signed up for. [The colouring-sheets guide](https://johnmorrisdotca.github.io/wakusei-planets/docs/guides/kids-sheets.html) says what each sheet is and how to print it, and [the size line-up guide](https://johnmorrisdotca.github.io/wakusei-planets/docs/guides/size-lineup.html) says where each star's radius comes from. Every source is credited in [NOTICE.md](NOTICE.md) and at the foot of each demo page.
|
|
21
45
|
|
|
22
46
|
## One minute
|
|
23
47
|
|
|
@@ -70,13 +94,6 @@ Every view already turns, zooms and pans with a drag, a pinch, Ctrl and the whee
|
|
|
70
94
|
|
|
71
95
|
A bundled app imports it: `import "@johnmorrisdotca/wakusei-planets/element"` (and `import { lineSvg } from "@johnmorrisdotca/wakusei-planets"` for the SVG string, which needs no browser). For the shaded look add the body's own entry point, `import "@johnmorrisdotca/wakusei-planets/jupiter"`, and `three` (an optional peer).
|
|
72
96
|
|
|
73
|
-
## Who it is for
|
|
74
|
-
|
|
75
|
-
- **A developer who wants a planet on a page** with one tag, no build step, and a drawing that is an SVG before any 3D has loaded.
|
|
76
|
-
- **A teacher, writer or museum** who needs the Sun, the planets and their moons at their real sizes and tilts, with every number traceable to the IAU, NASA or JPL.
|
|
77
|
-
- **A maker of sky tools** who wants a planet's pole, phase, ring opening and its moons' places for any date and time as plain data, on a server or in a browser.
|
|
78
|
-
- **A three.js developer** who wants the bodies as objects for a scene of their own.
|
|
79
|
-
|
|
80
97
|
## Features
|
|
81
98
|
|
|
82
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.
|
|
@@ -107,21 +124,33 @@ Import the element once in client code, and the entry point of each body you dra
|
|
|
107
124
|
|---|---|---|
|
|
108
125
|
| `line` | A clean outline drawing with the body's key features: bands, craters, rings and their gaps, caps, the dark side dashed off. An SVG. | nothing |
|
|
109
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 |
|
|
110
|
-
| `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 (Mars, the Moon, the Earth and ten moons: [close zoom](docs/guides/close-zoom.md)). | `three`, the body's entry point |
|
|
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 |
|
|
111
128
|
|
|
112
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.
|
|
113
130
|
|
|
114
131
|
## A star from its numbers
|
|
115
132
|
|
|
116
|
-
`<wakusei-body star="Betelgeuse" temperature-k="
|
|
133
|
+
`<wakusei-body star="Betelgeuse" temperature-k="3650" radius-sun="1057" luminosity-class="Iab">` draws any star in 3D or as a line drawing, from a few numbers and with no catalogue: the temperature gives the colour, the radius the size beside the Sun, the luminosity class the grain of the surface, the rotation how it turns, and a flattened star such as Vega or Altair is squashed with hotter poles. Granulation boils, an active star has spots, prominences and flares, and a soft corona glows round it, all through the same shared renderer, with a cheaper `quality="low"` for weak devices. Every star says which parts are measured and which are drawn for looks: *drawn from its numbers, not a photo*. The Sun keeps its own look. See [A star from its numbers](docs/guides/star-look.md) and the [star page](https://johnmorrisdotca.github.io/wakusei-planets/star.html).
|
|
117
134
|
|
|
118
135
|
```ts
|
|
119
136
|
import { starLook } from "@johnmorrisdotca/wakusei-planets";
|
|
120
137
|
|
|
121
|
-
const vega = starLook({ name: "Vega", temperatureK:
|
|
138
|
+
const vega = starLook({ name: "Vega", temperatureK: 9660, radiusSun: 2.726, oblateness: 0.113, rotationDays: 0.71 });
|
|
122
139
|
console.log(vega.colour, vega.parts.map((part) => part.status).join(", "));
|
|
123
140
|
```
|
|
124
141
|
|
|
142
|
+
## The size line-up
|
|
143
|
+
|
|
144
|
+
`<wakusei-lineup stars="bright" planets at="betelgeuse">` shows the Sun, Sirius A, Vega, Arcturus, Aldebaran, Rigel, Antares, Betelgeuse and the largest stars known (VY Canis Majoris, WOH G64, UY Scuti, Stephenson 2-18) side by side or one above the next at **true relative size**, each drawn with the star look and labelled with its radius in Suns and kilometres, its error and its paper. A slider zooms smoothly from the Sun (or the Earth, with `planets`) up to the largest star; each star turns slowly and a drag turns the one it takes hold of. Every radius is from a refereed paper that measured the star's angular diameter, or says it did not (WOH G64 and Stephenson 2-18 are estimated from brightness, UY Scuti's distance is not a parallax); where the papers disagree, the label and [the guide](docs/guides/size-lineup.md) say so. The demo's [size line-up page](https://johnmorrisdotca.github.io/wakusei-planets/lineup.html) saves the picture as a PNG or SVG, prints it as a poster on A4 or US Letter, and writes the code for every way of putting it in a page. The table needs no browser:
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
import { lineupBodies, lineupText } from "@johnmorrisdotca/wakusei-planets";
|
|
148
|
+
|
|
149
|
+
const largest = lineupBodies({ set: "largest" }).at(-1)!;
|
|
150
|
+
const text = lineupText(largest, "en");
|
|
151
|
+
console.log(`${text.name}: ${text.radius}, ${text.km}, ${text.source}`);
|
|
152
|
+
```
|
|
153
|
+
|
|
125
154
|
## Two packages: this one and chikyu-earth
|
|
126
155
|
|
|
127
156
|
This package is the Sun, the planets, the dwarf planets and the moons, and where they are. [chikyu-earth](https://github.com/johnmorrisdotca/chikyu-earth) is the Earth in detail: its countries, day and night, places and satellites. Each works alone; install both and the Earth's line look becomes chikyu-earth's globe with the countries. The dependency runs one way: this package may use chikyu-earth, never the reverse. [Why two packages](docs/guides/two-packages.md) has the rule, a table of what lives where and how to use them together.
|
|
@@ -290,7 +319,7 @@ A body that turns by itself and a moving sky, in HTML:
|
|
|
290
319
|
|
|
291
320
|
## The portrait builder
|
|
292
321
|
|
|
293
|
-
<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.
|
|
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>
|
|
294
323
|
|
|
295
324
|
[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.
|
|
296
325
|
|
|
@@ -341,7 +370,7 @@ The reference is a site, made from the source's own doc comments: every export h
|
|
|
341
370
|
|
|
342
371
|
| Entry point | What it gives |
|
|
343
372
|
| --- | --- |
|
|
344
|
-
| `@johnmorrisdotca/wakusei-planets` | The pure side: `BODIES`, `apparent`, `system`, `orbitPath`, `portrait`, `lineSvg`, `embedCode`, `starLook`, `starLineSvg`. No browser. |
|
|
373
|
+
| `@johnmorrisdotca/wakusei-planets` | The pure side: `BODIES`, `apparent`, `system`, `orbitPath`, `portrait`, `lineSvg`, `embedCode`, `lineupCode`, `lineupBodies`, `starLook`, `starLineSvg`. No browser. |
|
|
345
374
|
| `.../element` | `<wakusei-body>`; three.js is loaded only for a shaded look. |
|
|
346
375
|
| `.../portrait` | `<wakusei-portrait>`: many bodies in one scene. The scene model (`addBody`, `layoutPortrait`, `encodeScene`, `decodeScene`) is in the main entry. |
|
|
347
376
|
| `.../space` | Where the Sun, the Moon and the planets are for a date, in two scales, and where a camera riding along looks: `frameAt`, `createTrack`, `placeSun`, `placeAround`, `ridePose`. No browser. |
|
|
@@ -377,6 +406,7 @@ Each guide has a Japanese twin in [docs/guides/ja](docs/guides/ja/getting-starte
|
|
|
377
406
|
| [Moons and time](docs/guides/moons-and-time.md) | The sky on a date, time that runs fast |
|
|
378
407
|
| [The space view](docs/guides/space-view.md) | The Earth, Moon, Sun and planets in their places; two scales; time both ways |
|
|
379
408
|
| [A star from its numbers](docs/guides/star-look.md) | Any star in 3D or as lines, what is measured and what is drawn, every way to put it in a page |
|
|
409
|
+
| [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 |
|
|
380
410
|
| [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 |
|
|
381
411
|
| [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 |
|
|
382
412
|
| [Riding along](docs/guides/ride-along.md) | The camera on a moon, a planet or any moving point, looking at what it goes round |
|
|
@@ -405,13 +435,28 @@ import { BODIES } from "@johnmorrisdotca/wakusei-planets";
|
|
|
405
435
|
BODIES.pluto.kind; // "dwarf-planet"
|
|
406
436
|
```
|
|
407
437
|
|
|
408
|
-
-
|
|
438
|
+
- **What it is for.** Pictures, charts, teaching and stories about the sky. It is not an ephemeris for pointing a telescope or planning a flight: for that use [JPL Horizons](https://ssd.jpl.nasa.gov/horizons/) itself, which every position here is checked against.
|
|
439
|
+
- **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
|
+
- **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
|
+
- **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.
|
|
442
|
+
- **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
|
+
- **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
|
+
- **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.
|
|
445
|
+
- **Nothing is guessed.** A fact with no source is left out. [Accuracy](docs/guides/accuracy.md) has each body's number and how to run the check yourself.
|
|
409
446
|
- `realistic` and `painted` are the photo maps (`painted` is the same maps, so an older page still works). `illustrated` is the shaded drawing from the numbers, and it is not a default. Venus, Saturn, Neptune and the Sun use Solar System Scope's maps (CC BY 4.0). Mercury uses the natural grey 8K map (Shady Tex and Solar System Scope, CC BY 4.0). Mars stays on the Viking mosaic, graded toward a butterscotch ochre, with the frost in Hellas toned to the basin and the polar ice left. Jupiter and Uranus use Nestaeric's maps (CC BY 4.0), and Saturn's poles use Nestaeric's caps (CC BY 4.0). The Earth and the Moon stay on their NASA maps until those have been compared. The rest are the public-domain maps in `NOTICE.md`.
|
|
410
447
|
- A shaded look needs WebGL. Without it the line drawing is drawn.
|
|
411
448
|
- Jupiter, Saturn, Uranus and Neptune have their rings drawn.
|
|
412
449
|
- A portrait with no `turn` turns at 12 degrees a second, backwards when the body turns backwards. A picture with a date keeps that orientation and adds the same turn. `turn="0"` stays still.
|
|
413
450
|
- Pictures for the painted look are 1.31 MB in the package at 512 and 1024 pixels; a sharper picture is fetched when you zoom in.
|
|
414
451
|
|
|
452
|
+
## How to cite
|
|
453
|
+
|
|
454
|
+
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
|
+
|
|
456
|
+
> Morris, J. (2026). *Wakusei Planets* (version 0.31.0) [Computer software]. https://github.com/johnmorrisdotca/wakusei-planets
|
|
457
|
+
|
|
458
|
+
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
|
+
|
|
415
460
|
## Accessibility
|
|
416
461
|
|
|
417
462
|
- Every `<wakusei-body>` is an image with an accessible name from its body and look, such as "Saturn, line drawing", or the Japanese name with `lang="ja"`.
|
|
@@ -461,7 +506,7 @@ pnpm test:readme # every ts block of the README, type-checked and run against
|
|
|
461
506
|
pnpm test:usage # every way of using it in the README and the guides, built and opened
|
|
462
507
|
pnpm docs:check # the reference site's checks
|
|
463
508
|
pnpm test:demo # the demo and the docs site in a real browser
|
|
464
|
-
pnpm dev # the demo on http://127.0.0.1:
|
|
509
|
+
pnpm dev # the demo on http://127.0.0.1:8300/wakusei-planets/
|
|
465
510
|
```
|
|
466
511
|
|
|
467
512
|
The pictures in `docs/images` are made by the package's own script:
|
package/dist/embed.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type BodyId, type Look } from "./facts.ts";
|
|
2
|
+
import type { LineupSet } from "./lineup/data.ts";
|
|
3
|
+
import type { LineupLayout } from "./lineup/layout.ts";
|
|
2
4
|
import type { StarNumbers } from "./star.ts";
|
|
3
5
|
/**
|
|
4
6
|
* The ways `embedCode` writes a body into a page.
|
|
@@ -119,6 +121,68 @@ export interface PortraitEmbed {
|
|
|
119
121
|
* ```
|
|
120
122
|
*/
|
|
121
123
|
export declare function portraitCode(options: PortraitEmbed, kind?: EmbedKind, settings?: EmbedSettings): string;
|
|
124
|
+
/**
|
|
125
|
+
* The size line-up to put in a page: which stars, the planets, how they stand, where the camera starts, and how wide it is.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```ts
|
|
129
|
+
* import { lineupCode, type LineupEmbed } from "@johnmorrisdotca/wakusei-planets";
|
|
130
|
+
*
|
|
131
|
+
* const options: LineupEmbed = { stars: "bright", planets: true, at: "betelgeuse", width: 720 };
|
|
132
|
+
* console.log(lineupCode(options, "html"));
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
export interface LineupEmbed {
|
|
136
|
+
/** `all` (the default), `bright` or `largest`, or a list of ids from `LINEUP_STARS`. */
|
|
137
|
+
stars?: LineupSet | readonly string[];
|
|
138
|
+
/** Add the Earth and Jupiter. */
|
|
139
|
+
planets?: boolean;
|
|
140
|
+
/** `row` (the default) or `stack`. */
|
|
141
|
+
layout?: LineupLayout;
|
|
142
|
+
/** The id of the body the camera starts on; the Sun when left out. */
|
|
143
|
+
at?: string;
|
|
144
|
+
/** Where the camera starts, 0 to 1 (over `at`). */
|
|
145
|
+
zoom?: number;
|
|
146
|
+
/** False stops the bodies turning by themselves. */
|
|
147
|
+
turn?: boolean;
|
|
148
|
+
/** The planets' look: `realistic` (the default) or `painted`. */
|
|
149
|
+
look?: "realistic" | "painted";
|
|
150
|
+
/** The words: `en` (the default) or `ja`. */
|
|
151
|
+
lang?: "en" | "ja";
|
|
152
|
+
/** Pixels across; default 720. */
|
|
153
|
+
width?: number;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The text that puts the size line-up in a page, for each way a page is made, as `embedCode` does for a single body: a script tag, an ES module, React, Vue, Angular, Svelte or an iframe of the demo's `embed.html`.
|
|
157
|
+
* Every way is built, parsed or run by the package's tests.
|
|
158
|
+
*
|
|
159
|
+
* @param options - The stars, the planets, the layout, where the camera starts and the width.
|
|
160
|
+
* @param kind - The way the page is made; `html` by default.
|
|
161
|
+
* @param settings - The CDN and the demo's address, when they are not the package's own.
|
|
162
|
+
* @returns The text to paste into the page's source.
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```ts
|
|
166
|
+
* import { lineupCode } from "@johnmorrisdotca/wakusei-planets";
|
|
167
|
+
*
|
|
168
|
+
* console.log(lineupCode({ stars: "largest", at: "vy-canis-majoris" }, "react"));
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
export declare function lineupCode(options: LineupEmbed, kind?: EmbedKind, settings?: EmbedSettings): string;
|
|
172
|
+
/**
|
|
173
|
+
* The credits that travel with a picture of the size line-up: the radii are from refereed papers, the stars are drawn from numbers and not photographs, and the planets' sizes are the IAU's and NASA's.
|
|
174
|
+
*
|
|
175
|
+
* @param options - The choices, so the planets and their pictures are named only when they are used.
|
|
176
|
+
* @returns A short line of credit to put near the picture.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```ts
|
|
180
|
+
* import { lineupCredit } from "@johnmorrisdotca/wakusei-planets";
|
|
181
|
+
*
|
|
182
|
+
* console.log(lineupCredit({ planets: true }));
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
export declare function lineupCredit(options: LineupEmbed): string;
|
|
122
186
|
/**
|
|
123
187
|
* The credits that travel with a picture of a body: the line and illustrated looks are drawn from numbers, and `realistic` and `painted` use the surface maps.
|
|
124
188
|
*
|
package/dist/embed.js
CHANGED
|
@@ -127,6 +127,72 @@ export function portraitCode(options, kind = "html", settings = {}) {
|
|
|
127
127
|
attrs.push(["size", String(width)]);
|
|
128
128
|
return snippet(kind, { tag: "wakusei-portrait", element: "portrait", entries, attrs, name: "portrait", iframe: { src: `${site}embed.html?${new URLSearchParams({ scene: options.scene }).toString()}`, title: "Wakusei Planets portrait", width, height: Math.round(width / scene.aspect) } }, cdn);
|
|
129
129
|
}
|
|
130
|
+
/** The element's attributes for a line-up, in the order they are written. */
|
|
131
|
+
function lineupAttributes(o) {
|
|
132
|
+
const out = [];
|
|
133
|
+
const stars = o.stars === undefined || o.stars === "all" ? undefined : typeof o.stars === "string" ? o.stars : o.stars.join(",");
|
|
134
|
+
if (stars !== undefined)
|
|
135
|
+
out.push(["stars", stars]);
|
|
136
|
+
if (o.planets === true)
|
|
137
|
+
out.push(["planets", ""]);
|
|
138
|
+
if (o.layout === "stack")
|
|
139
|
+
out.push(["layout", "stack"]);
|
|
140
|
+
if (o.zoom !== undefined && Number.isFinite(o.zoom))
|
|
141
|
+
out.push(["zoom", String(Math.round(o.zoom * 1000) / 1000)]);
|
|
142
|
+
else if (o.at !== undefined && o.at !== "sun")
|
|
143
|
+
out.push(["at", o.at]);
|
|
144
|
+
if (o.turn === false)
|
|
145
|
+
out.push(["turn", "off"]);
|
|
146
|
+
if (o.look === "painted")
|
|
147
|
+
out.push(["look", "painted"]);
|
|
148
|
+
if (o.lang === "ja")
|
|
149
|
+
out.push(["lang", "ja"]);
|
|
150
|
+
if (o.width !== undefined && o.width !== 720)
|
|
151
|
+
out.push(["size", String(o.width)]);
|
|
152
|
+
return out;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* The text that puts the size line-up in a page, for each way a page is made, as `embedCode` does for a single body: a script tag, an ES module, React, Vue, Angular, Svelte or an iframe of the demo's `embed.html`.
|
|
156
|
+
* Every way is built, parsed or run by the package's tests.
|
|
157
|
+
*
|
|
158
|
+
* @param options - The stars, the planets, the layout, where the camera starts and the width.
|
|
159
|
+
* @param kind - The way the page is made; `html` by default.
|
|
160
|
+
* @param settings - The CDN and the demo's address, when they are not the package's own.
|
|
161
|
+
* @returns The text to paste into the page's source.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```ts
|
|
165
|
+
* import { lineupCode } from "@johnmorrisdotca/wakusei-planets";
|
|
166
|
+
*
|
|
167
|
+
* console.log(lineupCode({ stars: "largest", at: "vy-canis-majoris" }, "react"));
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
export function lineupCode(options, kind = "html", settings = {}) {
|
|
171
|
+
const cdn = settings.cdn ?? CDN;
|
|
172
|
+
const site = settings.site ?? SITE;
|
|
173
|
+
const width = options.width ?? 720;
|
|
174
|
+
const attrs = lineupAttributes(options);
|
|
175
|
+
const query = new URLSearchParams([["lineup", "1"], ...attrs.map(([name, value]) => [name, name === "planets" ? "1" : value])]);
|
|
176
|
+
return snippet(kind, { tag: "wakusei-lineup", element: "lineup", entries: [], attrs, name: "lineup", iframe: { src: `${site}embed.html?${query.toString()}`, title: "Wakusei Planets size line-up", width, height: Math.round((width * 9) / 16) } }, cdn);
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* The credits that travel with a picture of the size line-up: the radii are from refereed papers, the stars are drawn from numbers and not photographs, and the planets' sizes are the IAU's and NASA's.
|
|
180
|
+
*
|
|
181
|
+
* @param options - The choices, so the planets and their pictures are named only when they are used.
|
|
182
|
+
* @returns A short line of credit to put near the picture.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```ts
|
|
186
|
+
* import { lineupCredit } from "@johnmorrisdotca/wakusei-planets";
|
|
187
|
+
*
|
|
188
|
+
* console.log(lineupCredit({ planets: true }));
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
export function lineupCredit(options) {
|
|
192
|
+
const base = "Wakusei Planets by John Morris (MIT). Sizes at true relative scale; each star's radius is from a refereed paper that measured its angular diameter (sources and disagreements in the package's NOTICE.md). The stars are drawn from their numbers, not photographs: the cells, spots and glow are illustrative.";
|
|
193
|
+
const planets = options.planets === true ? " Earth and Jupiter: IAU and NASA sizes." + (options.look === "painted" ? " Surface pictures: NASA and Nestaeric (CC BY 4.0), see NOTICE.md." : "") : "";
|
|
194
|
+
return `${base}${planets}`;
|
|
195
|
+
}
|
|
130
196
|
/**
|
|
131
197
|
* The credits that travel with a picture of a body: the line and illustrated looks are drawn from numbers, and `realistic` and `painted` use the surface maps.
|
|
132
198
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,10 @@ export { JOURNEY_STOPS, journeyStop, stopPlaceAu, type JourneyStop } from "./sto
|
|
|
4
4
|
export { drawnTilt, portrait, type PortraitOptions } from "./pose.ts";
|
|
5
5
|
export { lineSvg, mix, type LineOptions } from "./line.ts";
|
|
6
6
|
export { ringStrip, type RingStrip } from "./scene/rings.ts";
|
|
7
|
-
export { embedCode, embedCredit, EMBED_KINDS, portraitCode, type EmbedKind, type EmbedOptions, type EmbedSettings, type PortraitEmbed } from "./embed.ts";
|
|
7
|
+
export { embedCode, embedCredit, EMBED_KINDS, lineupCode, lineupCredit, portraitCode, type EmbedKind, type EmbedOptions, type EmbedSettings, type LineupEmbed, type PortraitEmbed } from "./embed.ts";
|
|
8
8
|
export { addBody, decodeScene, defaultPortrait, encodeScene, PRESETS as PORTRAIT_PRESETS, resolve as layoutPortrait, type Item as PortraitItem, type Placed as PlacedItem, type Portrait, type Preset as PortraitPreset, type Resolved as PortraitLayout } from "./portrait/model.ts";
|
|
9
9
|
export { LUMINOSITY_CLASSES, STAR_SUN, starLook, type LuminosityClass, type StarLook, type StarNumberName, type StarNumbers, type StarPart, type StarStatus } from "./star.ts";
|
|
10
10
|
export { starLineSvg } from "./star-line.ts";
|
|
11
|
+
export { LINEUP_SETS, LINEUP_STARS, lineupBodies, type LineupBody, type LineupSet, type RadiusBasis, type RadiusRow } from "./lineup/data.ts";
|
|
12
|
+
export { LINEUP_LAYOUTS, lineupFocus, lineupProject, lineupView, lineupZoomFor, lineupZoomOf, placeLineup, type LineupDot, type LineupLayout, type LineupPlace, type LineupView } from "./lineup/layout.ts";
|
|
13
|
+
export { lineupKm, lineupLabels, lineupLabelsSvg, lineupText, type LineupLabel, type LineupLang, type LineupText } from "./lineup/labels.ts";
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,10 @@ export { JOURNEY_STOPS, journeyStop, stopPlaceAu } from "./stops.js";
|
|
|
4
4
|
export { drawnTilt, portrait } from "./pose.js";
|
|
5
5
|
export { lineSvg, mix } from "./line.js";
|
|
6
6
|
export { ringStrip } from "./scene/rings.js";
|
|
7
|
-
export { embedCode, embedCredit, EMBED_KINDS, portraitCode } from "./embed.js";
|
|
7
|
+
export { embedCode, embedCredit, EMBED_KINDS, lineupCode, lineupCredit, portraitCode } from "./embed.js";
|
|
8
8
|
export { addBody, decodeScene, defaultPortrait, encodeScene, PRESETS as PORTRAIT_PRESETS, resolve as layoutPortrait } from "./portrait/model.js";
|
|
9
9
|
export { LUMINOSITY_CLASSES, STAR_SUN, starLook } from "./star.js";
|
|
10
10
|
export { starLineSvg } from "./star-line.js";
|
|
11
|
+
export { LINEUP_SETS, LINEUP_STARS, lineupBodies } from "./lineup/data.js";
|
|
12
|
+
export { LINEUP_LAYOUTS, lineupFocus, lineupProject, lineupView, lineupZoomFor, lineupZoomOf, placeLineup } from "./lineup/layout.js";
|
|
13
|
+
export { lineupKm, lineupLabels, lineupLabelsSvg, lineupText } from "./lineup/labels.js";
|