@johnmorrisdotca/wakusei-planets 0.61.0 → 0.63.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 +17 -0
- package/README.md +3 -3
- package/dist/belts/filter.d.ts +128 -0
- package/dist/belts/filter.js +117 -0
- package/dist/belts/index.d.ts +2 -0
- package/dist/belts/index.js +1 -0
- package/dist/fact-sheets.d.ts +103 -0
- package/dist/fact-sheets.js +135 -0
- package/dist/flat/index.d.ts +1 -0
- package/dist/flat/index.js +1 -0
- package/dist/flat/projections.d.ts +300 -0
- package/dist/flat/projections.js +414 -0
- package/dist/landing-sites.js +6 -6
- package/dist/sky/events.d.ts +2 -0
- package/dist/sky/events.js +3 -2
- package/dist/suncalc-legacy.d.ts +21 -0
- package/dist/suncalc-legacy.js +13 -0
- package/dist/suncalc.d.ts +21 -0
- package/dist/suncalc.js +23 -8
- package/dist/surface/drive.d.ts +4 -3
- package/dist/surface/drive.js +6 -5
- package/dist/surface/dust.d.ts +2 -1
- package/dist/surface/dust.js +3 -2
- package/dist/surface/element.d.ts +3 -3
- package/dist/surface/element.js +31 -13
- package/dist/surface/flat.d.ts +34 -0
- package/dist/surface/flat.js +63 -0
- package/dist/surface/glsl.d.ts +6 -3
- package/dist/surface/glsl.js +35 -2
- package/dist/surface/height.d.ts +1 -1
- package/dist/surface/index.d.ts +3 -2
- package/dist/surface/index.js +3 -2
- package/dist/surface/land.d.ts +7 -5
- package/dist/surface/land.js +10 -8
- package/dist/surface/scene.d.ts +6 -2
- package/dist/surface/scene.js +41 -4
- package/dist/surface/site.d.ts +32 -3
- package/dist/surface/site.js +99 -2
- package/dist/surface/sky.d.ts +92 -1
- package/dist/surface/sky.js +78 -4
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.63.0] - 2026-11-17
|
|
6
|
+
|
|
7
|
+
- **A drop-in for suncalc 2.1 and 1.9: both flags, default exports, a guide** (MODULES-535). `getTimes` and `getMoonTimes` in `/suncalc` now give `alwaysUp` and `alwaysDown` both, one `true` and one `false`, on a day without a sunrise or without a Moon rise and set, as suncalc 2 does (before, only the true one was there). `/suncalc` and `/suncalc/legacy` each have a default export holding the same functions and the same `times` array, for code written `import SunCalc from "suncalc"`. A new guide, "Replacing suncalc" (English and Japanese), has the one-line import change, every function side by side, the three conventions people trip on, the differences kept on purpose, the measured limits, and suncalc3's extras listed and not built. `test/suncalc-grid.test.ts` runs every function against suncalc 2.1.2 and suncalc 1.9.0 (dev-only) on fourteen places (both hemispheres, both polar circles, 78 degrees north and south) by eleven days from 1900 to 2100 by three times of day; `test/docs-replacing-suncalc.test.ts` runs the guide's examples. The API snapshot was updated for the two default exports.
|
|
8
|
+
|
|
9
|
+
- **The ephemeris package survey, as a record** (MODULES-531). `docs/design/ephemeris-survey.md` lists each surveyed package with its licence line read on its own GitHub page on 2026-11-17 (MIT, Apache-2.0, AGPL-3.0, GPL), what it holds and how accurate it claims to be, and what is still open. Two facts of the first survey were corrected (vsop87 is about 2.3 MB, not 7; the ephemeris package says GPL v2 on its repo).
|
|
10
|
+
|
|
11
|
+
- **"Coming from suncalc 1.x or suncalc2" in the `/suncalc` guide, EN and JA** (MODULES-537). The one-line import change, radians to degrees and south to north azimuth side by side with a run that shows both, the day rule of the legacy `getTimes` and `getMoonTimes`, and a plain list of what suncalc3 adds (suncalc-ts adds nothing). The licence and fork findings are in `docs/design/suncalc-forks.md`. No code changed.
|
|
12
|
+
|
|
13
|
+
- **Fact sheets: `/fact-sheets`** (MODULES-529, first slice). `factSheet("mars")` gives, for the Sun, the eight planets and Pluto, the radius and mean distance in km and miles (and au), the sidereal year in Earth days, the rotation in hours and whether it is retrograde, the number of known moons and the date it was read (the `/moon-catalogue` count), NASA's own page, and a short description in our own words in English and Japanese. New guide, English and Japanese, with tested examples. A new entry point, so the API snapshot and the size baseline have a new line. Not in this slice: the definitions of planet, dwarf planet, moon, asteroid, comet, meteoroid, meteor and meteorite (held back until the IAU texts are checked against the originals), meteor showers (the IMO table's reuse terms must be read first) and a demo page.
|
|
14
|
+
|
|
15
|
+
- **Map projections for the painted maps** (MODULES-546, the pure side and the demo; no new dependency). `@johnmorrisdotca/wakusei-planets/flat` gains `PROJECTIONS` (`equirectangular`, `mercator`, `sinusoidal`, `mollweide`, `azimuthal`), `projectMap` and `unprojectMap` (radii from the middle of the map; `null` outside the leaf, the ellipse or the disc), `graticule` (lines of longitude and latitude cut where they would cross the map, none at a pole on Mercator, which stops at 85.05 degrees), `mapOutline`, `fitMap`, `mapPixels`, `mapSun` (the sub-solar point on the map, for any body with a pole and spin) and `resampleMap` (a body's equirectangular painted map redrawn in a projection: smooth between pixels, wrapping at the seam, holding at the poles, transparent outside the shape), with `isProjection`, `MERCATOR_LIMIT` and the types. The flat page of the demo has a panel, "Any body, in a projection": the 25 bodies with a painted map, the five projections, the grid (off, 30 or 15 degrees), the middle longitude and, on the disc, latitude, and a ring where the Sun is overhead; it draws only when something changes. English and Japanese in "Flat maps of the Moon and Mars" and the demo. Tests: `test/flat-projections.test.ts` (round trips about three centres, the poles, the shapes' areas, the grid's cuts, the seam), `e2e/flat-projections.demo.ts` and `examples/flat/projections.mjs`. Not done: `<wakusei-flat projection="...">` itself (its pans, picks and ground tracks read the plain map).
|
|
16
|
+
|
|
17
|
+
## [0.62.0] - 2026-11-17
|
|
18
|
+
|
|
19
|
+
- **Standing on Mars, and at six more sites: Perseverance, Curiosity, Apollo 15, Apollo 16, Chang'e 3 and Chang'e 4** (MODULES-1482, part 2; John Morris, 2026-11-17). `SURFACE_SITES` now has seven sites and `SurfaceSite.body` is `"moon" | "mars"`; the new `ground` is `"measured"` (Apollo 17, as before) or `"flat"`, and `gravity` is the body's surface gravity (`MOON_GRAVITY` 1.62, `MARS_GRAVITY` 3.71 m/s2). `<wakusei-surface site="perseverance">` and `land(space, "perseverance")` (also `curiosity`, `apollo-15`, `apollo-16`, `chang-e-3`, `chang-e-4`) work; the seven records in `LANDING_SITES` carry `stand`, and a test pins each to the standing view's point, place and landing moment. **The ground at the six new sites is a flat stand-in until a height model is added** ("ground: flat stand-in until a DTM is added", in the page's line and in `manifest.accuracy`): flat at the site's datum, made in memory by `flatTerrain` and `flatManifest` with nothing fetched, and with no relief, no made craters and no made rocks (`detail` is ignored there), so no relief is faked. The height data would be a download (HiRISE or CTX models for Mars, LROC or LOLA for the Moon) and is not here. **Real for the place and time**: the Sun's direction and size from the package's own ephemeris (`standSky`, `localFrame` takes a body; on Mars the Sun is about a third of a degree across), the gravity (the driven rover's slope and free fall, `driveStep`'s new last argument, and the thrown dust, `DustField.step`'s), and the Moon's black sky with its Earth. **Chosen, not measured**: Mars's sky, a butterscotch day sky with a pale blue glow round a low Sun, black at night after a long twilight (`marsAir`, drawn by a new sky pass in the shader; NASA's page says the sky is hazy and reddish from suspended dust), and the ground's reddish tone; the Earth is not drawn from Mars. New exports of `/surface`: `standSky`, `marsAir`, `flatTerrain`, `flatManifest`, `MOON_GRAVITY`, `MARS_GRAVITY` and the types `StandSky`, `SkyAir` and `Rgb`; `TerrainManifest.body` is `"moon" | "mars"`. Tests: `test/surface-sites.test.ts` and `e2e/surface-sites.demo.ts` (no tiles asked for, the flat line, a butterscotch sky over a reddish ground on Mars and a black sky over a grey ground on the Moon, nothing drawn at rest). Guide: "Standing on the Moon and Mars", in both languages. **Not here yet**: the measured ground of any of them, and the rover models at the new sites (`drive-model` takes the GLB as before).
|
|
20
|
+
|
|
21
|
+
- **Belt filters and size tiers** (MODULES-558, part). `filterBeltBodies(bodies, { belts, hMax, hMin, status, part })`, `beltStatus(name)` (provisional, numbered or named), `beltPart(body, jd, jupiterLongitude)` (the main belt's inner, middle and outer parts, the Trojans' L4 and L5 camps, plutinos and detached bodies), `BELT_TIERS` and `beltTiers(bodies)` (how many bodies of each size tier are carried, against how many the database knows). All from the rows already carried: no new data. Still open on the ticket: discovery facts and pictures (need files fetched), the embed and the builder.
|
|
5
22
|
## [0.61.0] - 2026-11-17
|
|
6
23
|
|
|
7
24
|
- **IM-2's three rovers stand on Athena, east of the prime meridian** (MODULES-1402; John Morris, 2026-11-17). GCAT's lander catalogue has the whole IM-2 landing at 84.7906 S, 29.1957 W; NASA's table, which the places take, puts Athena at 29.1957 E, but GRACE, MAPP and Yaoki, which NASA's table does not list, kept the catalogue's point on the far side of the prime meridian. `scripts/make-places-data.py` now moves a rover the catalogue puts at its lander's own point with the lander whenever a better source moves the lander more than 0.05 degree and has no position of its own for the rover; the rovers keep the catalogue's figure in `gcatPosition`. No other rover on the Moon or Mars disagrees with its lander, and a test pins both.
|
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.
|
|
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.63.0/docs/images/lineup-desk.png" width="640"></p>
|
|
23
23
|
|
|
24
24
|
## Who it is for
|
|
25
25
|
|
|
@@ -412,7 +412,7 @@ The tiles of every body share one 48 MB budget, six loads at a time for a source
|
|
|
412
412
|
|
|
413
413
|
## The portrait builder
|
|
414
414
|
|
|
415
|
-
<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.
|
|
415
|
+
<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.63.0/docs/images/portrait-family.png" width="640"></p>
|
|
416
416
|
|
|
417
417
|
[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.
|
|
418
418
|
|
|
@@ -567,7 +567,7 @@ BODIES.pluto.kind; // "dwarf-planet"
|
|
|
567
567
|
|
|
568
568
|
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:
|
|
569
569
|
|
|
570
|
-
> Morris, J. (2026). *Wakusei Planets* (version 0.
|
|
570
|
+
> Morris, J. (2026). *Wakusei Planets* (version 0.63.0) [Computer software]. https://github.com/johnmorrisdotca/wakusei-planets
|
|
571
571
|
|
|
572
572
|
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).
|
|
573
573
|
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { type BeltBody, type BeltId } from "./index.ts";
|
|
2
|
+
/**
|
|
3
|
+
* How far a small body has come on its way to a name: `provisional` (only a designation such as `2007 OR10`), `numbered` (a number, no name yet: `15760`) or `named` (`588 Achilles`).
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* import type { BeltStatus } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
8
|
+
*
|
|
9
|
+
* const status: BeltStatus = "named";
|
|
10
|
+
* console.log(status);
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export type BeltStatus = "provisional" | "numbered" | "named";
|
|
14
|
+
/**
|
|
15
|
+
* The status of a body from its name as the Small-Body Database writes it: a number then a name is `named`, a bare number is `numbered`, a designation of a year and letters is `provisional`.
|
|
16
|
+
*
|
|
17
|
+
* @param name - The body's name, such as `588 Achilles`, `15760` or `2007 OR10`.
|
|
18
|
+
* @returns The status.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { beltStatus } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
23
|
+
*
|
|
24
|
+
* console.log(beltStatus("588 Achilles"), beltStatus("2007 OR10"));
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function beltStatus(name: string): BeltStatus;
|
|
28
|
+
/**
|
|
29
|
+
* A part of a belt that the filters know: the main belt's `inner-main` (inside the 3:1 gap, under 2.5 au), `middle-main` (2.5 to 2.82 au) and `outer-main` (beyond the 5:2 gap), the Trojans' two camps `trojan-l4` (ahead of Jupiter)
|
|
30
|
+
* and `trojan-l5` (behind it), the Kuiper belt's `plutino` (the 3:2 resonance with Neptune, 39.0 to 39.9 au) and the `detached` (a scattered body that never comes nearer than 40 au to the Sun, like Sedna).
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* import type { BeltPart } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
35
|
+
*
|
|
36
|
+
* const part: BeltPart = "plutino";
|
|
37
|
+
* console.log(part);
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export type BeltPart = "inner-main" | "middle-main" | "outer-main" | "trojan-l4" | "trojan-l5" | "plutino" | "detached";
|
|
41
|
+
/**
|
|
42
|
+
* Which part of its belt a body is in, or `undefined` where it is in none of the parts (a Hilda, a Centaur, a classical or other resonant body). A Trojan's camp needs Jupiter's heliocentric ecliptic longitude on the date (from `heliocentric("jupiter", ms)`);
|
|
43
|
+
* without it a Trojan has no part.
|
|
44
|
+
*
|
|
45
|
+
* @param body - The body.
|
|
46
|
+
* @param jd - The date, as a Julian date (TT).
|
|
47
|
+
* @param jupiterLongitude - Jupiter's longitude in degrees on that date, for the Trojans.
|
|
48
|
+
* @returns The part, or `undefined` where the body is in none of them.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import { beltPart } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
53
|
+
*
|
|
54
|
+
* console.log(beltPart({ name: "T", a: 2.7, e: 0.1, i: 5, node: 80, peri: 70, M0: 10, epoch: 2461200.5, H: 9, belt: "main" }, 2461200.5));
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function beltPart(body: BeltBody, jd: number, jupiterLongitude?: number): BeltPart | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* What to keep: bodies of these `belts`, of at least `hMax` brightness (a body with an absolute magnitude H no greater than `hMax`: smaller H is a bigger body), at most `hMin`, with one of these `status` values, and of this `part` (for
|
|
60
|
+
* which `jd` and, for the Trojans, `jupiterLongitude` are needed).
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* import type { BeltFilter } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
65
|
+
*
|
|
66
|
+
* const filter: BeltFilter = { belts: ["trojan"], hMax: 10, status: ["named"] };
|
|
67
|
+
* console.log(filter.hMax);
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export interface BeltFilter {
|
|
71
|
+
belts?: readonly BeltId[];
|
|
72
|
+
/** Keep bodies with an absolute magnitude H of this or less (the bigger ones). */
|
|
73
|
+
hMax?: number;
|
|
74
|
+
/** Keep bodies with an absolute magnitude H of this or more (the smaller ones). */
|
|
75
|
+
hMin?: number;
|
|
76
|
+
status?: readonly BeltStatus[];
|
|
77
|
+
part?: BeltPart;
|
|
78
|
+
/** The date for `part`, as a Julian date (TT). */
|
|
79
|
+
jd?: number;
|
|
80
|
+
/** Jupiter's longitude in degrees on `jd`, for `part` of `trojan-l4` or `trojan-l5`. */
|
|
81
|
+
jupiterLongitude?: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The bodies that pass a filter, in their order.
|
|
85
|
+
*
|
|
86
|
+
* @param bodies - The bodies, from `loadBeltBodies`.
|
|
87
|
+
* @param filter - What to keep; an empty filter keeps every body.
|
|
88
|
+
* @returns The bodies that pass.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* import { filterBeltBodies, loadBeltBodies } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
93
|
+
*
|
|
94
|
+
* const big = filterBeltBodies(await loadBeltBodies(), { belts: ["main"], hMax: 7 });
|
|
95
|
+
* console.log(big.length);
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
export declare function filterBeltBodies(bodies: readonly BeltBody[], filter?: BeltFilter): BeltBody[];
|
|
99
|
+
/**
|
|
100
|
+
* The size tiers: the upper edge of the absolute magnitude H of each (a body of H 10 is about 35 km across in the main belt, with an albedo of 0.06 about 60 km; H does not give a size without the albedo, so the tiers are in H).
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { BELT_TIERS } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
105
|
+
*
|
|
106
|
+
* console.log(BELT_TIERS.join(", "));
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export declare const BELT_TIERS: readonly [8, 10, 12, 14, 99];
|
|
110
|
+
/**
|
|
111
|
+
* How many bodies this package carries in each size tier of each belt, with the number the database holds for the belt beside it, so a page can say how small a part is drawn. Tier `k` holds the bodies with H above the
|
|
112
|
+
* tier before it and up to `BELT_TIERS[k]`.
|
|
113
|
+
*
|
|
114
|
+
* @param bodies - The bodies, from `loadBeltBodies`.
|
|
115
|
+
* @returns For each belt, the `carried` count of each tier, the total `sample` and the `known` count from `BELTS`.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* import { beltTiers, loadBeltBodies } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
120
|
+
*
|
|
121
|
+
* console.log(beltTiers(await loadBeltBodies()).main.carried.join(", "));
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
export declare function beltTiers(bodies: readonly BeltBody[]): Record<BeltId, {
|
|
125
|
+
carried: number[];
|
|
126
|
+
sample: number;
|
|
127
|
+
known: number;
|
|
128
|
+
}>;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Filters and tiers for the belts' bodies (MODULES-558): the status of a body from its name, the part of its belt it is in, a filter by belt, part, size and status, and how many bodies each size tier holds. Everything is worked out from the rows
|
|
2
|
+
// the package already carries; nothing is fetched. Pure: no DOM, no three.js.
|
|
3
|
+
import { BELT_IDS, BELTS } from "./index.js";
|
|
4
|
+
import { smallBodyAt } from "../door/small-bodies.js";
|
|
5
|
+
/**
|
|
6
|
+
* The status of a body from its name as the Small-Body Database writes it: a number then a name is `named`, a bare number is `numbered`, a designation of a year and letters is `provisional`.
|
|
7
|
+
*
|
|
8
|
+
* @param name - The body's name, such as `588 Achilles`, `15760` or `2007 OR10`.
|
|
9
|
+
* @returns The status.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* import { beltStatus } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
14
|
+
*
|
|
15
|
+
* console.log(beltStatus("588 Achilles"), beltStatus("2007 OR10"));
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export function beltStatus(name) {
|
|
19
|
+
const text = name.trim();
|
|
20
|
+
if (/^\d{4} [A-Z]{2}\d*$/.test(text))
|
|
21
|
+
return "provisional";
|
|
22
|
+
if (/^\d+$/.test(text))
|
|
23
|
+
return "numbered";
|
|
24
|
+
return /^\d+ \S/.test(text) ? "named" : "provisional";
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Which part of its belt a body is in, or `undefined` where it is in none of the parts (a Hilda, a Centaur, a classical or other resonant body). A Trojan's camp needs Jupiter's heliocentric ecliptic longitude on the date (from `heliocentric("jupiter", ms)`);
|
|
28
|
+
* without it a Trojan has no part.
|
|
29
|
+
*
|
|
30
|
+
* @param body - The body.
|
|
31
|
+
* @param jd - The date, as a Julian date (TT).
|
|
32
|
+
* @param jupiterLongitude - Jupiter's longitude in degrees on that date, for the Trojans.
|
|
33
|
+
* @returns The part, or `undefined` where the body is in none of them.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* import { beltPart } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
38
|
+
*
|
|
39
|
+
* console.log(beltPart({ name: "T", a: 2.7, e: 0.1, i: 5, node: 80, peri: 70, M0: 10, epoch: 2461200.5, H: 9, belt: "main" }, 2461200.5));
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export function beltPart(body, jd, jupiterLongitude) {
|
|
43
|
+
if (body.belt === "main")
|
|
44
|
+
return body.a < 2.5 ? "inner-main" : body.a <= 2.82 ? "middle-main" : "outer-main";
|
|
45
|
+
if (body.belt === "resonant")
|
|
46
|
+
return body.a >= 39.0 && body.a <= 39.9 ? "plutino" : undefined;
|
|
47
|
+
if (body.belt === "scattered")
|
|
48
|
+
return body.a * (1 - body.e) > 40 ? "detached" : undefined;
|
|
49
|
+
if (body.belt === "trojan" && jupiterLongitude !== undefined) {
|
|
50
|
+
const [x, y] = smallBodyAt(body, jd);
|
|
51
|
+
const ahead = ((((Math.atan2(y, x) * 180) / Math.PI - jupiterLongitude + 180) % 360) + 360) % 360 - 180;
|
|
52
|
+
return ahead >= 0 ? "trojan-l4" : "trojan-l5";
|
|
53
|
+
}
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The bodies that pass a filter, in their order.
|
|
58
|
+
*
|
|
59
|
+
* @param bodies - The bodies, from `loadBeltBodies`.
|
|
60
|
+
* @param filter - What to keep; an empty filter keeps every body.
|
|
61
|
+
* @returns The bodies that pass.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* import { filterBeltBodies, loadBeltBodies } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
66
|
+
*
|
|
67
|
+
* const big = filterBeltBodies(await loadBeltBodies(), { belts: ["main"], hMax: 7 });
|
|
68
|
+
* console.log(big.length);
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export function filterBeltBodies(bodies, filter = {}) {
|
|
72
|
+
return bodies.filter((body) => {
|
|
73
|
+
if (filter.belts !== undefined && !filter.belts.includes(body.belt))
|
|
74
|
+
return false;
|
|
75
|
+
if (filter.hMax !== undefined && body.H > filter.hMax)
|
|
76
|
+
return false;
|
|
77
|
+
if (filter.hMin !== undefined && body.H < filter.hMin)
|
|
78
|
+
return false;
|
|
79
|
+
if (filter.status !== undefined && !filter.status.includes(beltStatus(body.name)))
|
|
80
|
+
return false;
|
|
81
|
+
return filter.part === undefined || beltPart(body, filter.jd ?? 0, filter.jupiterLongitude) === filter.part;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The size tiers: the upper edge of the absolute magnitude H of each (a body of H 10 is about 35 km across in the main belt, with an albedo of 0.06 about 60 km; H does not give a size without the albedo, so the tiers are in H).
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* import { BELT_TIERS } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
90
|
+
*
|
|
91
|
+
* console.log(BELT_TIERS.join(", "));
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export const BELT_TIERS = [8, 10, 12, 14, 99];
|
|
95
|
+
/**
|
|
96
|
+
* How many bodies this package carries in each size tier of each belt, with the number the database holds for the belt beside it, so a page can say how small a part is drawn. Tier `k` holds the bodies with H above the
|
|
97
|
+
* tier before it and up to `BELT_TIERS[k]`.
|
|
98
|
+
*
|
|
99
|
+
* @param bodies - The bodies, from `loadBeltBodies`.
|
|
100
|
+
* @returns For each belt, the `carried` count of each tier, the total `sample` and the `known` count from `BELTS`.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { beltTiers, loadBeltBodies } from "@johnmorrisdotca/wakusei-planets/belts";
|
|
105
|
+
*
|
|
106
|
+
* console.log(beltTiers(await loadBeltBodies()).main.carried.join(", "));
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export function beltTiers(bodies) {
|
|
110
|
+
const out = Object.fromEntries(BELT_IDS.map((id) => [id, { carried: BELT_TIERS.map(() => 0), sample: 0, known: BELTS[id].known }]));
|
|
111
|
+
for (const body of bodies) {
|
|
112
|
+
const k = BELT_TIERS.findIndex((edge) => body.H <= edge);
|
|
113
|
+
out[body.belt].carried[k] += 1;
|
|
114
|
+
out[body.belt].sample += 1;
|
|
115
|
+
}
|
|
116
|
+
return out;
|
|
117
|
+
}
|
package/dist/belts/index.d.ts
CHANGED
|
@@ -268,3 +268,5 @@ export declare function beltFlight(belt: BeltId): {
|
|
|
268
268
|
velocity: [number, number, number];
|
|
269
269
|
};
|
|
270
270
|
};
|
|
271
|
+
export { BELT_TIERS, beltPart, beltStatus, beltTiers, filterBeltBodies } from "./filter.ts";
|
|
272
|
+
export type { BeltFilter, BeltPart, BeltStatus } from "./filter.ts";
|
package/dist/belts/index.js
CHANGED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The bodies that have a fact sheet: the Sun, the eight planets and Pluto.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { FACT_SHEET_IDS } from "@johnmorrisdotca/wakusei-planets/fact-sheets";
|
|
7
|
+
*
|
|
8
|
+
* console.log(FACT_SHEET_IDS.join(", "));
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare const FACT_SHEET_IDS: readonly ["sun", "mercury", "venus", "earth", "mars", "jupiter", "saturn", "uranus", "neptune", "pluto"];
|
|
12
|
+
/**
|
|
13
|
+
* The name of a body that has a fact sheet.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { FACT_SHEET_IDS, type FactSheetId } from "@johnmorrisdotca/wakusei-planets/fact-sheets";
|
|
18
|
+
*
|
|
19
|
+
* const id: FactSheetId = FACT_SHEET_IDS[3];
|
|
20
|
+
* console.log(id);
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export type FactSheetId = (typeof FACT_SHEET_IDS)[number];
|
|
24
|
+
/**
|
|
25
|
+
* A number in kilometres and in miles.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* import { factSheet, type Length } from "@johnmorrisdotca/wakusei-planets/fact-sheets";
|
|
30
|
+
*
|
|
31
|
+
* const radius: Length = factSheet("earth").radius;
|
|
32
|
+
* console.log(Math.round(radius.km), Math.round(radius.miles));
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export interface Length {
|
|
36
|
+
km: number;
|
|
37
|
+
miles: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A fact sheet: what a page about a body usually says, as data.
|
|
41
|
+
*
|
|
42
|
+
* `radius` is the equatorial radius. `distanceFromSun` is the mean distance (zero for the Sun). `yearDays` is the sidereal year in Earth days (the time to go once round the Sun; `null` for the Sun) and
|
|
43
|
+
* `rotationHours` the time to turn once on its axis against the stars (so it is not the length of a solar day: Venus's sidereal rotation is longer than its year's solar day), with `retrograde` true for a body
|
|
44
|
+
* that turns backwards (Venus, Uranus and Pluto). `knownMoons` is the number of moons known on `moonsReadOn` (a date: the count moves as moons are found). `nasaPage` is NASA's own page about the body.
|
|
45
|
+
* `description` is a short description in our own words.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* import { factSheet, type FactSheet } from "@johnmorrisdotca/wakusei-planets/fact-sheets";
|
|
50
|
+
*
|
|
51
|
+
* const mars: FactSheet = factSheet("mars");
|
|
52
|
+
* console.log(mars.name.en, mars.knownMoons, mars.nasaPage);
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export interface FactSheet {
|
|
56
|
+
id: FactSheetId;
|
|
57
|
+
name: {
|
|
58
|
+
en: string;
|
|
59
|
+
ja: string;
|
|
60
|
+
};
|
|
61
|
+
kind: "star" | "planet" | "dwarf-planet";
|
|
62
|
+
radius: Length;
|
|
63
|
+
distanceFromSun: Length & {
|
|
64
|
+
au: number;
|
|
65
|
+
};
|
|
66
|
+
yearDays: number | null;
|
|
67
|
+
rotationHours: number;
|
|
68
|
+
retrograde: boolean;
|
|
69
|
+
knownMoons: number;
|
|
70
|
+
moonsReadOn: string;
|
|
71
|
+
nasaPage: string;
|
|
72
|
+
description: {
|
|
73
|
+
en: string;
|
|
74
|
+
ja: string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The date the moon counts were read from JPL's planetary satellite page, the same read as `/moon-catalogue`'s `MOON_CATALOGUE_FETCHED`.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* import { MOONS_READ_ON } from "@johnmorrisdotca/wakusei-planets/fact-sheets";
|
|
83
|
+
*
|
|
84
|
+
* console.log("moon counts read on", MOONS_READ_ON);
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export declare const MOONS_READ_ON = "2026-11-11";
|
|
88
|
+
/**
|
|
89
|
+
* The fact sheet of the Sun, a planet or Pluto.
|
|
90
|
+
*
|
|
91
|
+
* @param id - `"sun"`, `"mercury"` to `"neptune"`, or `"pluto"`.
|
|
92
|
+
* @returns The sheet (a new object each call).
|
|
93
|
+
* @throws {RangeError} For an id that has no fact sheet, naming it.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* import { factSheet } from "@johnmorrisdotca/wakusei-planets/fact-sheets";
|
|
98
|
+
*
|
|
99
|
+
* const venus = factSheet("venus");
|
|
100
|
+
* console.log(venus.yearDays, venus.retrograde, venus.description.en);
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export declare function factSheet(id: FactSheetId): FactSheet;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// A fact sheet for the Sun, the eight planets and Pluto, as plain data.
|
|
2
|
+
// Every number is the package's own (radius and rotation from the IAU working group's report, the distance from JPL's approximate elements) or a published figure with its source named here: the sidereal
|
|
3
|
+
// year from NASA's planetary fact sheets (https://nssdc.gsfc.nasa.gov/planetary/factsheet/, read 2026-11-17), the moon counts from JPL's planetary satellite page (read 2026-11-11, the same read as `/moon-catalogue`),
|
|
4
|
+
// the page links to NASA's own page for each body (each fetched 2026-11-17). The descriptions are written here in our own words; no text of NASA's, the IAU's or an encyclopedia's is copied.
|
|
5
|
+
// Pure: no DOM, no clock reads, no three.js.
|
|
6
|
+
import { BODIES } from "./facts.js";
|
|
7
|
+
import { journeyStop } from "./stops.js";
|
|
8
|
+
const KM_PER_MILE = 1.609344;
|
|
9
|
+
const AU_KM = 149_597_870.7;
|
|
10
|
+
/**
|
|
11
|
+
* The bodies that have a fact sheet: the Sun, the eight planets and Pluto.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { FACT_SHEET_IDS } from "@johnmorrisdotca/wakusei-planets/fact-sheets";
|
|
16
|
+
*
|
|
17
|
+
* console.log(FACT_SHEET_IDS.join(", "));
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export const FACT_SHEET_IDS = ["sun", "mercury", "venus", "earth", "mars", "jupiter", "saturn", "uranus", "neptune", "pluto"];
|
|
21
|
+
/**
|
|
22
|
+
* The date the moon counts were read from JPL's planetary satellite page, the same read as `/moon-catalogue`'s `MOON_CATALOGUE_FETCHED`.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { MOONS_READ_ON } from "@johnmorrisdotca/wakusei-planets/fact-sheets";
|
|
27
|
+
*
|
|
28
|
+
* console.log("moon counts read on", MOONS_READ_ON);
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export const MOONS_READ_ON = "2026-11-11";
|
|
32
|
+
// The sidereal year in Earth days, NASA planetary fact sheets (orbital period).
|
|
33
|
+
const YEAR_DAYS = {
|
|
34
|
+
mercury: 87.969,
|
|
35
|
+
venus: 224.701,
|
|
36
|
+
earth: 365.256,
|
|
37
|
+
mars: 686.98,
|
|
38
|
+
jupiter: 4332.589,
|
|
39
|
+
saturn: 10759.22,
|
|
40
|
+
uranus: 30685.4,
|
|
41
|
+
neptune: 60189,
|
|
42
|
+
pluto: 90560,
|
|
43
|
+
};
|
|
44
|
+
// The known moons on MOONS_READ_ON (JPL's planetary satellite page); a test holds these to `/moon-catalogue`.
|
|
45
|
+
const MOONS = { sun: 0, mercury: 0, venus: 0, earth: 1, mars: 2, jupiter: 115, saturn: 293, uranus: 29, neptune: 16, pluto: 5 };
|
|
46
|
+
const NASA = {
|
|
47
|
+
sun: "https://science.nasa.gov/sun/",
|
|
48
|
+
mercury: "https://science.nasa.gov/mercury/",
|
|
49
|
+
venus: "https://science.nasa.gov/venus/",
|
|
50
|
+
earth: "https://science.nasa.gov/earth/",
|
|
51
|
+
mars: "https://science.nasa.gov/mars/",
|
|
52
|
+
jupiter: "https://science.nasa.gov/jupiter/",
|
|
53
|
+
saturn: "https://science.nasa.gov/saturn/",
|
|
54
|
+
uranus: "https://science.nasa.gov/uranus/",
|
|
55
|
+
neptune: "https://science.nasa.gov/neptune/",
|
|
56
|
+
pluto: "https://science.nasa.gov/dwarf-planets/pluto/",
|
|
57
|
+
};
|
|
58
|
+
const DESCRIPTION = {
|
|
59
|
+
sun: {
|
|
60
|
+
en: "The star at the centre of the solar system. It holds almost all of the system's mass and its light and heat keep every planet going.",
|
|
61
|
+
ja: "太陽系の中心にある恒星です。太陽系の質量のほぼすべてを占め、その光と熱がすべての惑星を支えています。",
|
|
62
|
+
},
|
|
63
|
+
mercury: {
|
|
64
|
+
en: "The smallest planet and the nearest to the Sun. It is a dry, cratered rock with almost no air, so its days are scorching and its nights bitterly cold.",
|
|
65
|
+
ja: "いちばん小さく、太陽にいちばん近い惑星です。クレーターだらけの乾いた岩の星で、空気がほとんどないため、昼は灼熱、夜は極寒になります。",
|
|
66
|
+
},
|
|
67
|
+
venus: {
|
|
68
|
+
en: "A rocky planet almost the size of the Earth, wrapped in thick clouds and a heavy carbon dioxide atmosphere that makes it the hottest planet. It turns backwards, very slowly.",
|
|
69
|
+
ja: "地球とほぼ同じ大きさの岩の惑星です。厚い雲と二酸化炭素の濃い大気に包まれ、惑星の中でいちばん高温です。とてもゆっくり、逆向きに自転します。",
|
|
70
|
+
},
|
|
71
|
+
earth: {
|
|
72
|
+
en: "Our home, the only place known to have life. It is the one planet with liquid water on its surface, and it has one large Moon.",
|
|
73
|
+
ja: "私たちの住む星で、生命が確認されている唯一の場所です。表面に液体の水がある唯一の惑星で、大きな衛星を1つ持っています。",
|
|
74
|
+
},
|
|
75
|
+
mars: {
|
|
76
|
+
en: "A cold, dry, rusty-red desert planet with a thin air of carbon dioxide, the tallest volcano known and two small moons. Robots have explored its surface for decades.",
|
|
77
|
+
ja: "二酸化炭素の薄い大気を持つ、冷たく乾いた赤さび色の砂漠の惑星です。知られている中で最も高い火山と、2つの小さな衛星があります。何十年も前からロボットが地表を調べています。",
|
|
78
|
+
},
|
|
79
|
+
jupiter: {
|
|
80
|
+
en: "The largest planet, a giant ball of hydrogen and helium with bands of cloud and a storm bigger than the Earth that has raged for centuries. It has a faint ring and a great many moons.",
|
|
81
|
+
ja: "最大の惑星で、水素とヘリウムでできた巨大なガスの球です。雲の縞模様と、何百年も続く地球より大きな嵐があります。かすかな環と、たくさんの衛星を持っています。",
|
|
82
|
+
},
|
|
83
|
+
saturn: {
|
|
84
|
+
en: "A giant planet of hydrogen and helium, famous for its wide, bright rings of ice. It is light enough that it would float in a big enough bath, and it has more known moons than any other planet.",
|
|
85
|
+
ja: "水素とヘリウムでできた巨大な惑星で、氷でできた広く明るい環で知られています。密度が水より小さく、十分に大きなお風呂があれば浮かぶほどです。知られている衛星の数は惑星の中でいちばん多いです。",
|
|
86
|
+
},
|
|
87
|
+
uranus: {
|
|
88
|
+
en: "A cold blue-green giant that spins on its side, as if rolling round the Sun. Its air of hydrogen, helium and methane gives it its colour, and it has faint rings and many moons.",
|
|
89
|
+
ja: "冷たい青緑色の巨大な惑星で、横倒しになって、転がるように太陽のまわりを回ります。水素、ヘリウム、メタンの大気がその色を生みます。かすかな環と多くの衛星があります。",
|
|
90
|
+
},
|
|
91
|
+
neptune: {
|
|
92
|
+
en: "The farthest planet from the Sun, a deep blue giant with the fastest winds known on any planet. It takes about 165 years to go once round the Sun and has faint rings and many moons.",
|
|
93
|
+
ja: "太陽からいちばん遠い惑星で、濃い青色の巨大な惑星です。知られている中で最も速い風が吹きます。太陽を1周するのに約165年かかり、かすかな環と多くの衛星があります。",
|
|
94
|
+
},
|
|
95
|
+
pluto: {
|
|
96
|
+
en: "A small, icy dwarf planet in the Kuiper belt beyond Neptune, with a heart-shaped bright plain, a thin air that freezes and falls as snow when it moves away from the Sun, and five known moons.",
|
|
97
|
+
ja: "海王星より外側のカイパーベルトにある、小さく氷でできた準惑星です。ハート形の明るい平原があり、薄い大気は太陽から遠ざかると凍って雪になります。知られている衛星は5つです。",
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* The fact sheet of the Sun, a planet or Pluto.
|
|
102
|
+
*
|
|
103
|
+
* @param id - `"sun"`, `"mercury"` to `"neptune"`, or `"pluto"`.
|
|
104
|
+
* @returns The sheet (a new object each call).
|
|
105
|
+
* @throws {RangeError} For an id that has no fact sheet, naming it.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* import { factSheet } from "@johnmorrisdotca/wakusei-planets/fact-sheets";
|
|
110
|
+
*
|
|
111
|
+
* const venus = factSheet("venus");
|
|
112
|
+
* console.log(venus.yearDays, venus.retrograde, venus.description.en);
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
export function factSheet(id) {
|
|
116
|
+
if (!FACT_SHEET_IDS.includes(id))
|
|
117
|
+
throw new RangeError(`There is no fact sheet for "${String(id)}"; it has one for ${FACT_SHEET_IDS.join(", ")}.`);
|
|
118
|
+
const facts = BODIES[id];
|
|
119
|
+
const au = id === "sun" ? 0 : journeyStop(id).sunAu;
|
|
120
|
+
const km = (value) => ({ km: value, miles: value / KM_PER_MILE });
|
|
121
|
+
return {
|
|
122
|
+
id,
|
|
123
|
+
name: { ...facts.name },
|
|
124
|
+
kind: facts.kind === "star" ? "star" : facts.kind === "dwarf-planet" ? "dwarf-planet" : "planet",
|
|
125
|
+
radius: km(facts.radiusKm),
|
|
126
|
+
distanceFromSun: { ...km(au * AU_KM), au },
|
|
127
|
+
yearDays: id === "sun" ? null : YEAR_DAYS[id],
|
|
128
|
+
rotationHours: Math.abs(facts.rotationHours),
|
|
129
|
+
retrograde: facts.rotationHours < 0,
|
|
130
|
+
knownMoons: MOONS[id],
|
|
131
|
+
moonsReadOn: MOONS_READ_ON,
|
|
132
|
+
nasaPage: NASA[id],
|
|
133
|
+
description: { ...DESCRIPTION[id] },
|
|
134
|
+
};
|
|
135
|
+
}
|
package/dist/flat/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { FLAT_BODIES, ORBITER_COLOURS, flatBody, isFlatBody, orbiterColour, orbiterName, type FlatBodyId, type FlatBodyInfo } from "./bodies.ts";
|
|
2
2
|
export { MAX_ZOOM, clampView, pixelsPerDegree, projectFlat, unprojectFlat, wrapLongitude, zoomAbout, type FlatView } from "./geometry.ts";
|
|
3
|
+
export { MERCATOR_LIMIT, PROJECTIONS, fitMap, graticule, isProjection, mapExtent, mapOutline, mapPixels, mapSun, projectMap, resampleMap, unprojectMap, type GraticuleLine, type MapCentre, type MapFit, type MapLine, type MapPixels, type ProjectionId } from "./projections.ts";
|
|
3
4
|
export { circleOutline, flatOrbiter, flatSun, flatTrack, hasPath, shadeNight, trackPieces, type FlatOrbiter } from "./scene.ts";
|
|
4
5
|
export { FLAT_WORDS, coordinateText, say, type FlatLang } from "./words.ts";
|
|
5
6
|
export type { FlatPick, WakuseiFlat } from "./element.ts";
|
package/dist/flat/index.js
CHANGED
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
// The element itself is in `@johnmorrisdotca/wakusei-planets/flat/define`, which registers `<wakusei-flat>`.
|
|
3
3
|
export { FLAT_BODIES, ORBITER_COLOURS, flatBody, isFlatBody, orbiterColour, orbiterName } from "./bodies.js";
|
|
4
4
|
export { MAX_ZOOM, clampView, pixelsPerDegree, projectFlat, unprojectFlat, wrapLongitude, zoomAbout } from "./geometry.js";
|
|
5
|
+
export { MERCATOR_LIMIT, PROJECTIONS, fitMap, graticule, isProjection, mapExtent, mapOutline, mapPixels, mapSun, projectMap, resampleMap, unprojectMap } from "./projections.js";
|
|
5
6
|
export { circleOutline, flatOrbiter, flatSun, flatTrack, hasPath, shadeNight, trackPieces } from "./scene.js";
|
|
6
7
|
export { FLAT_WORDS, coordinateText, say } from "./words.js";
|