@johnmorrisdotca/wakusei-planets 0.59.0 → 0.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/NOTICE.md +9 -0
  3. package/README.md +31 -3
  4. package/dist/bodies/earth.js +22 -1
  5. package/dist/data/places-moon.d.ts +12 -9
  6. package/dist/data/places-moon.js +3 -3
  7. package/dist/element.d.ts +1 -1
  8. package/dist/flat/bodies.d.ts +122 -0
  9. package/dist/flat/bodies.js +115 -0
  10. package/dist/flat/define.d.ts +3 -0
  11. package/dist/flat/define.js +6 -0
  12. package/dist/flat/element.d.ts +145 -0
  13. package/dist/flat/element.js +1614 -0
  14. package/dist/flat/geometry.d.ts +127 -0
  15. package/dist/flat/geometry.js +121 -0
  16. package/dist/flat/index.d.ts +5 -0
  17. package/dist/flat/index.js +6 -0
  18. package/dist/flat/scene.d.ts +152 -0
  19. package/dist/flat/scene.js +195 -0
  20. package/dist/flat/system-define.d.ts +3 -0
  21. package/dist/flat/system-define.js +6 -0
  22. package/dist/flat/system-element.d.ts +133 -0
  23. package/dist/flat/system-element.js +1435 -0
  24. package/dist/flat/system-words.d.ts +28 -0
  25. package/dist/flat/system-words.js +102 -0
  26. package/dist/flat/system.d.ts +440 -0
  27. package/dist/flat/system.js +521 -0
  28. package/dist/flat/words.d.ts +55 -0
  29. package/dist/flat/words.js +133 -0
  30. package/dist/space/travel.js +36 -5
  31. package/dist/surface/drive.d.ts +5 -2
  32. package/dist/surface/drive.js +13 -15
  33. package/dist/surface/element.d.ts +38 -1
  34. package/dist/surface/element.js +144 -14
  35. package/dist/surface/index.d.ts +1 -0
  36. package/dist/surface/index.js +1 -0
  37. package/dist/surface/model.d.ts +54 -0
  38. package/dist/surface/model.js +147 -0
  39. package/dist/surface/rig.d.ts +125 -0
  40. package/dist/surface/rig.js +107 -0
  41. package/dist/surface/scene.d.ts +3 -0
  42. package/dist/surface/scene.js +22 -1
  43. package/package.json +38 -2
@@ -0,0 +1,28 @@
1
+ import type { FlatLang } from "./words.ts";
2
+ /**
3
+ * The words the flat solar system writes, one table for each language: `{name}`, `{distance}` and the like are filled in. The Japanese is standard, polite Japanese.
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { SYSTEM_WORDS } from "@johnmorrisdotca/wakusei-planets/flat/system";
8
+ *
9
+ * console.log(SYSTEM_WORDS.en.orbits, SYSTEM_WORDS.ja.orbits);
10
+ * ```
11
+ */
12
+ export declare const SYSTEM_WORDS: Readonly<Record<FlatLang, Readonly<Record<string, string>>>>;
13
+ /**
14
+ * The words with their `{name}` places filled in; a key a language does not have is said in English, and a key neither has comes back as it is.
15
+ *
16
+ * @param lang - `en` or `ja`.
17
+ * @param key - A key of `SYSTEM_WORDS`.
18
+ * @param values - What goes in the `{...}` places.
19
+ * @returns The sentence.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * import { saySystem } from "@johnmorrisdotca/wakusei-planets/flat/system";
24
+ *
25
+ * console.log(saySystem("en", "shown", { n: 40 }), "|", saySystem("ja", "shown", { n: 40 }));
26
+ * ```
27
+ */
28
+ export declare const saySystem: (lang: FlatLang, key: string, values?: Record<string, string | number>) => string;
@@ -0,0 +1,102 @@
1
+ /**
2
+ * The words the flat solar system writes, one table for each language: `{name}`, `{distance}` and the like are filled in. The Japanese is standard, polite Japanese.
3
+ *
4
+ * @example
5
+ * ```ts
6
+ * import { SYSTEM_WORDS } from "@johnmorrisdotca/wakusei-planets/flat/system";
7
+ *
8
+ * console.log(SYSTEM_WORDS.en.orbits, SYSTEM_WORDS.ja.orbits);
9
+ * ```
10
+ */
11
+ export const SYSTEM_WORDS = {
12
+ en: {
13
+ map: "Flat map of the solar system",
14
+ controls: "Map controls",
15
+ centreOn: "Centre the map on {where}",
16
+ sun: "Sun",
17
+ earth: "Earth",
18
+ layersFilter: "What to show",
19
+ planets: "Planets",
20
+ dwarfs: "Dwarf planets and small bodies",
21
+ belts: "Belts",
22
+ comets: "Comets",
23
+ craft: "Spacecraft",
24
+ orbits: "Orbits",
25
+ track: "Paths",
26
+ zoomIn: "Zoom in",
27
+ zoomOut: "Zoom out",
28
+ all: "All",
29
+ scaleSqueezed: "Squeezed scale",
30
+ scaleTrue: "To scale",
31
+ scaleNoteSqueezed: "Distances are squeezed so the inner planets show; the rings are {rings} au from the Sun.",
32
+ scaleNoteTrue: "Distances are in proportion; the rings are {rings} au from the Sun.",
33
+ kind_star: "star",
34
+ kind_planet: "planet",
35
+ "kind_dwarf-planet": "dwarf planet",
36
+ kind_asteroid: "asteroid",
37
+ kind_centaur: "centaur",
38
+ kind_comet: "comet",
39
+ kind_spacecraft: "spacecraft",
40
+ kind_belt: "belt body",
41
+ announceBody: "{name}, {kind}, {distance} au from the Sun{note}",
42
+ announceSun: "{name}, the Sun, at the middle of the map",
43
+ predicted: ", position predicted",
44
+ help: "Arrow keys move from one body to the next, Enter chooses it, plus and minus zoom.",
45
+ shown: "{n} bodies shown",
46
+ nothing: "Nothing to show.",
47
+ ring: "{n} au",
48
+ },
49
+ ja: {
50
+ map: "太陽系の平面図",
51
+ controls: "地図の操作",
52
+ centreOn: "地図の中心を{where}にする",
53
+ sun: "太陽",
54
+ earth: "地球",
55
+ layersFilter: "表示するもの",
56
+ planets: "惑星",
57
+ dwarfs: "準惑星と小天体",
58
+ belts: "小惑星帯など",
59
+ comets: "彗星",
60
+ craft: "探査機",
61
+ orbits: "軌道",
62
+ track: "航跡",
63
+ zoomIn: "拡大",
64
+ zoomOut: "縮小",
65
+ all: "すべて",
66
+ scaleSqueezed: "圧縮表示",
67
+ scaleTrue: "実寸表示",
68
+ scaleNoteSqueezed: "内側の惑星が見えるよう距離を圧縮しています。輪は太陽から{rings} auです。",
69
+ scaleNoteTrue: "距離は実際の比で表示しています。輪は太陽から{rings} auです。",
70
+ kind_star: "恒星",
71
+ kind_planet: "惑星",
72
+ "kind_dwarf-planet": "準惑星",
73
+ kind_asteroid: "小惑星",
74
+ kind_centaur: "ケンタウルス族",
75
+ kind_comet: "彗星",
76
+ kind_spacecraft: "探査機",
77
+ kind_belt: "小惑星帯などの天体",
78
+ announceBody: "{name}、{kind}、太陽から{distance} au{note}",
79
+ announceSun: "{name}、地図の中心にある太陽",
80
+ predicted: "、位置は予測",
81
+ help: "矢印キーで次の天体へ移り、Enter キーで選びます。プラスとマイナスのキーで拡大・縮小します。",
82
+ shown: "天体{n}個を表示中",
83
+ nothing: "表示するものがありません。",
84
+ ring: "{n} au",
85
+ },
86
+ };
87
+ /**
88
+ * The words with their `{name}` places filled in; a key a language does not have is said in English, and a key neither has comes back as it is.
89
+ *
90
+ * @param lang - `en` or `ja`.
91
+ * @param key - A key of `SYSTEM_WORDS`.
92
+ * @param values - What goes in the `{...}` places.
93
+ * @returns The sentence.
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * import { saySystem } from "@johnmorrisdotca/wakusei-planets/flat/system";
98
+ *
99
+ * console.log(saySystem("en", "shown", { n: 40 }), "|", saySystem("ja", "shown", { n: 40 }));
100
+ * ```
101
+ */
102
+ export const saySystem = (lang, key, values = {}) => (SYSTEM_WORDS[lang][key] ?? SYSTEM_WORDS.en[key] ?? key).replace(/\{(\w+)\}/g, (all, name) => String(values[name] ?? all));
@@ -0,0 +1,440 @@
1
+ import { type SmallBody } from "../door/small-bodies.ts";
2
+ import { type PlanSpacing } from "../plan/layout.ts";
3
+ import { type Vec3 } from "../vec.ts";
4
+ /**
5
+ * The kinds of thing the flat solar system draws, which a page can switch on and off: `planets` (the eight and Pluto), `dwarfs` (the dwarf planets and the named asteroids and centaurs), `belts` (the asteroid belts and the Kuiper belt, as clouds of points), `comets` and `craft`.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { SYSTEM_LAYERS } from "@johnmorrisdotca/wakusei-planets/flat/system";
10
+ *
11
+ * console.log(SYSTEM_LAYERS.join(", "));
12
+ * ```
13
+ */
14
+ export declare const SYSTEM_LAYERS: readonly ["planets", "dwarfs", "belts", "comets", "craft"];
15
+ /**
16
+ * One layer of the flat solar system.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * import type { SystemLayer } from "@johnmorrisdotca/wakusei-planets/flat/system";
21
+ *
22
+ * const layer: SystemLayer = "comets";
23
+ * console.log(layer);
24
+ * ```
25
+ */
26
+ export type SystemLayer = (typeof SYSTEM_LAYERS)[number];
27
+ /**
28
+ * What a mark on the map is: the Sun (`star`), a `planet`, a `dwarf-planet`, an `asteroid`, a `centaur`, a `comet` or a `spacecraft`.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * import type { SystemKind } from "@johnmorrisdotca/wakusei-planets/flat/system";
33
+ *
34
+ * const kind: SystemKind = "spacecraft";
35
+ * console.log(kind);
36
+ * ```
37
+ */
38
+ export type SystemKind = "star" | "planet" | "dwarf-planet" | "asteroid" | "centaur" | "comet" | "spacecraft";
39
+ /**
40
+ * How the map sits in its box: the box's size in pixels, the place under its middle in the map's own plane (the unit disc, the edge at 1, x to the March equinox and y a quarter turn on), and the zoom (1 shows the whole disc, up to 8).
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * import type { SystemView } from "@johnmorrisdotca/wakusei-planets/flat/system";
45
+ *
46
+ * const view: SystemView = { width: 800, height: 450, centerX: 0, centerY: 0, zoom: 1 };
47
+ * console.log(view.zoom);
48
+ * ```
49
+ */
50
+ export interface SystemView {
51
+ width: number;
52
+ height: number;
53
+ centerX: number;
54
+ centerY: number;
55
+ zoom: number;
56
+ }
57
+ /**
58
+ * The furthest the map zooms in: the same 8 times as the flat maps of the Moon and Mars.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * import { SYSTEM_MAX_ZOOM } from "@johnmorrisdotca/wakusei-planets/flat/system";
63
+ *
64
+ * console.log(SYSTEM_MAX_ZOOM);
65
+ * ```
66
+ */
67
+ export declare const SYSTEM_MAX_ZOOM = 8;
68
+ /**
69
+ * The distance, in astronomical units, the squeezed scale treats as near the Sun: the plan's own (`<wakusei-plan>`), so the two maps put a planet in the same place on their radii.
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * import { SYSTEM_INNER } from "@johnmorrisdotca/wakusei-planets/flat/system";
74
+ *
75
+ * console.log(SYSTEM_INNER);
76
+ * ```
77
+ */
78
+ export declare const SYSTEM_INNER = 0.1;
79
+ /**
80
+ * The reach of the map, the distance at its edge in astronomical units: the smallest of 50, 100, 200, 500, 1,000 and 2,000 that holds `farthest`, or `fixed` where one is asked for.
81
+ *
82
+ * @param farthest - The distance in the plane of the farthest thing that must be inside, in au.
83
+ * @param fixed - A reach the page asked for, in au; used when it is above zero and finite.
84
+ * @returns The distance at the edge, in au.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * import { systemExtent } from "@johnmorrisdotca/wakusei-planets/flat/system";
89
+ *
90
+ * console.log(systemExtent(49.3), systemExtent(141), systemExtent(141, 30));
91
+ * ```
92
+ */
93
+ export declare const systemExtent: (farthest: number, fixed?: number) => number;
94
+ /**
95
+ * Where a place in the ecliptic plane falls on the map's disc: its direction kept, its distance squeezed (`ln(1 + d / 0.1) / ln(1 + edge / 0.1)`, the plan's `planRadius`) or true (`d / edge`). The edge is 1.
96
+ *
97
+ * @param x - Astronomical units toward the March equinox.
98
+ * @param y - Astronomical units a quarter turn on.
99
+ * @param extent - The distance at the edge, in au.
100
+ * @param spacing - `squeezed` or `true`.
101
+ * @returns `x` and `y` in the unit disc, and `r`, the distance from the middle (above 1 beyond the edge).
102
+ *
103
+ * @example
104
+ * ```ts
105
+ * import { squeezeAu } from "@johnmorrisdotca/wakusei-planets/flat/system";
106
+ *
107
+ * const earth = squeezeAu(1, 0, 50, "squeezed");
108
+ * console.log(earth.r.toFixed(2), squeezeAu(1, 0, 50, "true").r.toFixed(2));
109
+ * ```
110
+ */
111
+ export declare function squeezeAu(x: number, y: number, extent: number, spacing: PlanSpacing): {
112
+ x: number;
113
+ y: number;
114
+ r: number;
115
+ };
116
+ /**
117
+ * The distance in astronomical units that a radius of the disc stands for: the opposite of the squeeze, so a point pressed on the map can be read as a distance.
118
+ *
119
+ * @param r - The distance from the middle in the unit disc.
120
+ * @param extent - The distance at the edge, in au.
121
+ * @param spacing - `squeezed` or `true`.
122
+ * @returns Astronomical units.
123
+ *
124
+ * @example
125
+ * ```ts
126
+ * import { radiusAu, squeezeAu } from "@johnmorrisdotca/wakusei-planets/flat/system";
127
+ *
128
+ * console.log(radiusAu(squeezeAu(5.2, 0, 50, "squeezed").r, 50, "squeezed").toFixed(2));
129
+ * ```
130
+ */
131
+ export declare const radiusAu: (r: number, extent: number, spacing: PlanSpacing) => number;
132
+ /**
133
+ * Pixels for one unit of the disc: the whole disc fills the box's shorter side at zoom 1.
134
+ *
135
+ * @param view - The view.
136
+ * @returns Pixels to the disc's edge from its middle.
137
+ *
138
+ * @example
139
+ * ```ts
140
+ * import { systemScale } from "@johnmorrisdotca/wakusei-planets/flat/system";
141
+ *
142
+ * console.log(systemScale({ width: 800, height: 400, centerX: 0, centerY: 0, zoom: 1 }), systemScale({ width: 800, height: 400, centerX: 0, centerY: 0, zoom: 2 }));
143
+ * ```
144
+ */
145
+ export declare const systemScale: (view: SystemView) => number;
146
+ /**
147
+ * Where a place of the disc falls in the box, in pixels from its top left (y goes up on the map and down on the screen).
148
+ *
149
+ * @param view - The view.
150
+ * @param x - Across the unit disc.
151
+ * @param y - Up the unit disc.
152
+ * @returns `x` and `y` in pixels.
153
+ *
154
+ * @example
155
+ * ```ts
156
+ * import { projectSystem } from "@johnmorrisdotca/wakusei-planets/flat/system";
157
+ *
158
+ * console.log(projectSystem({ width: 800, height: 400, centerX: 0, centerY: 0, zoom: 1 }, 0, 0));
159
+ * ```
160
+ */
161
+ export declare function projectSystem(view: SystemView, x: number, y: number): {
162
+ x: number;
163
+ y: number;
164
+ };
165
+ /**
166
+ * The place of the disc at a point of the box: the opposite of `projectSystem`.
167
+ *
168
+ * @param view - The view.
169
+ * @param px - Pixels from the left.
170
+ * @param py - Pixels from the top.
171
+ * @returns `x` and `y` in the unit disc.
172
+ *
173
+ * @example
174
+ * ```ts
175
+ * import { unprojectSystem } from "@johnmorrisdotca/wakusei-planets/flat/system";
176
+ *
177
+ * console.log(unprojectSystem({ width: 800, height: 400, centerX: 0, centerY: 0, zoom: 1 }, 400, 200));
178
+ * ```
179
+ */
180
+ export declare function unprojectSystem(view: SystemView, px: number, py: number): {
181
+ x: number;
182
+ y: number;
183
+ };
184
+ /**
185
+ * The view kept inside what the map can show: the zoom between 1 and 8, and the middle never further from the Sun than the disc's edge.
186
+ *
187
+ * @param view - The view asked for.
188
+ * @returns The view to use.
189
+ *
190
+ * @example
191
+ * ```ts
192
+ * import { clampSystemView } from "@johnmorrisdotca/wakusei-planets/flat/system";
193
+ *
194
+ * console.log(clampSystemView({ width: 800, height: 400, centerX: 3, centerY: 4, zoom: 20 }));
195
+ * ```
196
+ */
197
+ export declare function clampSystemView(view: SystemView): SystemView;
198
+ /**
199
+ * Zoom by a factor about a point of the box, so the place under that point stays under it (as far as the clamp allows).
200
+ *
201
+ * @param view - The view.
202
+ * @param factor - Above 1 zooms in.
203
+ * @param px - Pixels from the left; the middle when left out.
204
+ * @param py - Pixels from the top; the middle when left out.
205
+ * @returns The new view, clamped.
206
+ *
207
+ * @example
208
+ * ```ts
209
+ * import { zoomSystemAbout } from "@johnmorrisdotca/wakusei-planets/flat/system";
210
+ *
211
+ * console.log(zoomSystemAbout({ width: 800, height: 400, centerX: 0, centerY: 0, zoom: 1 }, 2, 600, 100).zoom);
212
+ * ```
213
+ */
214
+ export declare function zoomSystemAbout(view: SystemView, factor: number, px?: number, py?: number): SystemView;
215
+ /**
216
+ * Distances worth a ring on the map, in astronomical units: the Earth's (1), Jupiter's (5), Saturn's (10), Neptune's (30) and 100.
217
+ *
218
+ * @example
219
+ * ```ts
220
+ * import { SYSTEM_RINGS } from "@johnmorrisdotca/wakusei-planets/flat/system";
221
+ *
222
+ * console.log(SYSTEM_RINGS.join(" "));
223
+ * ```
224
+ */
225
+ export declare const SYSTEM_RINGS: readonly number[];
226
+ /**
227
+ * The colour of a mark: a planet's own, a pale grey for the dwarf planets and small bodies, ice blue for a comet and one of a set for each craft; the Tesla Roadster is red.
228
+ *
229
+ * @param id - A planet, dwarf planet, small body, comet or craft id, or `sun`.
230
+ * @param layer - Its layer.
231
+ * @returns A CSS colour.
232
+ *
233
+ * @example
234
+ * ```ts
235
+ * import { systemColour } from "@johnmorrisdotca/wakusei-planets/flat/system";
236
+ *
237
+ * console.log(systemColour("earth", "planets"), systemColour("roadster", "craft"));
238
+ * ```
239
+ */
240
+ export declare function systemColour(id: string, layer: SystemLayer | "sun"): string;
241
+ /**
242
+ * The ids the dwarfs layer draws: the dwarf planets, then Vesta, Pallas, Chiron and Pholus (Halley is among the comets).
243
+ *
244
+ * @example
245
+ * ```ts
246
+ * import { SYSTEM_DWARFS } from "@johnmorrisdotca/wakusei-planets/flat/system";
247
+ *
248
+ * console.log(SYSTEM_DWARFS.join(", "));
249
+ * ```
250
+ */
251
+ export declare const SYSTEM_DWARFS: readonly string[];
252
+ /**
253
+ * One thing on the map at a moment.
254
+ *
255
+ * @example
256
+ * ```ts
257
+ * import { systemMarks, type SystemMark } from "@johnmorrisdotca/wakusei-planets/flat/system";
258
+ *
259
+ * const earth: SystemMark = systemMarks(Date.UTC(2026, 10, 17), { layers: ["planets"] }).find((m) => m.id === "earth")!;
260
+ * console.log(earth.distanceAu.toFixed(2), earth.kind);
261
+ * ```
262
+ */
263
+ export interface SystemMark {
264
+ id: string;
265
+ layer: SystemLayer | "sun";
266
+ kind: SystemKind;
267
+ /** Where it is, in astronomical units from the Sun, in the J2000 ecliptic. */
268
+ au: Vec3;
269
+ /** Its distance from the Sun in the plane of the map, in au (its height does not count: the map is a view from above). */
270
+ planeAu: number;
271
+ /** Its distance from the Sun in three dimensions, in au. */
272
+ distanceAu: number;
273
+ /** Where it falls on the unit disc for the reach and spacing asked for. */
274
+ x: number;
275
+ y: number;
276
+ /** True when it is further out than the edge: it is left off the map. */
277
+ beyond: boolean;
278
+ }
279
+ /**
280
+ * What `systemMarks` is asked: the layers, the craft and comets to draw (all by default), the reach (`auto`, the smallest step that holds the planets, the dwarf planets and the craft shown, by default) and the spacing.
281
+ *
282
+ * @example
283
+ * ```ts
284
+ * import type { SystemOptions } from "@johnmorrisdotca/wakusei-planets/flat/system";
285
+ *
286
+ * const options: SystemOptions = { layers: ["planets", "craft"], craft: ["roadster"], spacing: "true" };
287
+ * console.log(options.layers);
288
+ * ```
289
+ */
290
+ export interface SystemOptions {
291
+ /** Default: every layer except the belts, which `systemBelts` places. */
292
+ layers?: readonly SystemLayer[];
293
+ /** The craft to draw; default all of them. */
294
+ craft?: readonly string[];
295
+ /** The comets to draw; default all of them. */
296
+ comets?: readonly string[];
297
+ /** A reach in au; default the smallest step that holds what is shown. */
298
+ extent?: number;
299
+ /** Default `squeezed`. */
300
+ spacing?: PlanSpacing;
301
+ }
302
+ /**
303
+ * The craft's place at a moment in astronomical units, or `undefined` while its path is not loaded (`loadSpacecraft`) or the moment is outside the record of its path (a craft that has not launched, or whose record has ended).
304
+ *
305
+ * @param id - The craft.
306
+ * @param ms - Milliseconds since 1970 (UTC).
307
+ * @returns The place, or `undefined`.
308
+ *
309
+ * @example
310
+ * ```ts
311
+ * import { loadSpacecraft } from "@johnmorrisdotca/wakusei-planets/spacecraft";
312
+ * import { craftAu } from "@johnmorrisdotca/wakusei-planets/flat/system";
313
+ *
314
+ * await loadSpacecraft("roadster");
315
+ * const car = craftAu("roadster", Date.UTC(2026, 10, 17));
316
+ * console.log(car === undefined ? "not loaded" : Math.hypot(car[0], car[1]).toFixed(1), "au from the Sun");
317
+ * ```
318
+ */
319
+ export declare function craftAu(id: string, ms: number): Vec3 | undefined;
320
+ /**
321
+ * The name of a thing on the map in a language: the Sun, a planet, a dwarf planet or small body, a comet or a craft. The Tesla Roadster is called by its car's name (the mannequin is Starman, in the facts).
322
+ *
323
+ * @param id - The thing's id.
324
+ * @param lang - `en` or `ja`.
325
+ * @returns The name, or the id where there is none.
326
+ *
327
+ * @example
328
+ * ```ts
329
+ * import { systemName } from "@johnmorrisdotca/wakusei-planets/flat/system";
330
+ *
331
+ * console.log(systemName("roadster", "en"), "|", systemName("roadster", "ja"), "|", systemName("halley", "ja"));
332
+ * ```
333
+ */
334
+ export declare function systemName(id: string, lang: "en" | "ja"): string;
335
+ /**
336
+ * What every drawn thing is at a moment, with its place on the disc. The planets come from VSOP87B and the fitted tables, the dwarf planets and small bodies from their fitted tables or one epoch's elements, the comets by two-body motion on JPL's elements,
337
+ * and the craft from the Horizons paths, which must be loaded first (`loadSpacecraft`); a craft with no path at that moment is left out. A thing further out than the reach is marked `beyond` and not worth drawing.
338
+ *
339
+ * @param ms - Milliseconds since 1970 (UTC).
340
+ * @param options - The layers, the craft and comets wanted, the reach and the spacing.
341
+ * @returns The Sun first, then the planets, dwarfs, comets and craft.
342
+ *
343
+ * @example
344
+ * ```ts
345
+ * import { systemMarks } from "@johnmorrisdotca/wakusei-planets/flat/system";
346
+ *
347
+ * const marks = systemMarks(Date.UTC(2026, 10, 17), { layers: ["planets", "comets"] });
348
+ * const earth = marks.find((m) => m.id === "earth")!;
349
+ * console.log(marks.length, Math.round((Math.atan2(earth.au[1], earth.au[0]) * 180) / Math.PI), "degrees of ecliptic longitude");
350
+ * ```
351
+ */
352
+ export declare function systemMarks(ms: number, options?: SystemOptions): SystemMark[];
353
+ /**
354
+ * The reach the map stands at for what is drawn: what `systemMarks` used. Worked out the same way, from the planets, the dwarf planets and the craft shown, so the map's scale can be had without placing the marks again.
355
+ *
356
+ * @param marks - The marks from `systemMarks`.
357
+ * @param fixed - A reach the page asked for, in au.
358
+ * @returns The distance at the edge, in au.
359
+ *
360
+ * @example
361
+ * ```ts
362
+ * import { systemMarks, systemReach } from "@johnmorrisdotca/wakusei-planets/flat/system";
363
+ *
364
+ * console.log(systemReach(systemMarks(Date.UTC(2026, 10, 17), { layers: ["planets"] })));
365
+ * ```
366
+ */
367
+ export declare const systemReach: (marks: readonly SystemMark[], fixed?: number) => number;
368
+ /**
369
+ * Where the bodies of the belts are at a moment, in au in the ecliptic plane: two numbers a body, the Kepler orbit of each one's elements (`beltPositions` without the height, which a view from above does not use).
370
+ *
371
+ * @param bodies - The belt bodies, from `loadBeltBodies`.
372
+ * @param ms - Milliseconds since 1970 (UTC).
373
+ * @param out - A list of `2 * bodies.length` numbers to fill in; made when left out.
374
+ * @returns The list.
375
+ *
376
+ * @example
377
+ * ```ts
378
+ * import { systemBelts } from "@johnmorrisdotca/wakusei-planets/flat/system";
379
+ *
380
+ * const body = { name: "T", a: 2.7, e: 0, i: 0, node: 0, peri: 0, M0: 0, epoch: 2461200.5, H: 9 };
381
+ * console.log(systemBelts([body], Date.UTC(2026, 10, 17))[0]?.toFixed(2));
382
+ * ```
383
+ */
384
+ export declare function systemBelts(bodies: readonly SmallBody[], ms: number, out?: Float32Array): Float32Array;
385
+ /**
386
+ * The orbit line of a planet, dwarf planet or small body, as points in the ecliptic plane in au: one trip round the Sun from the start of the year the moment is in (a planet's path changes by less than a pixel in a year), kept for that year.
387
+ *
388
+ * @param id - A planet, dwarf planet or small body of the map.
389
+ * @param ms - Milliseconds since 1970 (UTC).
390
+ * @param points - How many steps round it.
391
+ * @returns The points; the last is the first again.
392
+ *
393
+ * @example
394
+ * ```ts
395
+ * import { systemOrbit } from "@johnmorrisdotca/wakusei-planets/flat/system";
396
+ *
397
+ * const line = systemOrbit("earth", Date.UTC(2026, 10, 17));
398
+ * console.log(line.length, Math.hypot(...line[0]!).toFixed(2));
399
+ * ```
400
+ */
401
+ export declare function systemOrbit(id: string, ms: number, points?: number): readonly (readonly [number, number])[];
402
+ /**
403
+ * A comet's orbit line as points in the ecliptic plane in au, as far out as the reach.
404
+ *
405
+ * @param id - The comet's id.
406
+ * @param reach - The furthest distance to draw, in au.
407
+ * @returns The points.
408
+ *
409
+ * @example
410
+ * ```ts
411
+ * import { systemCometOrbit } from "@johnmorrisdotca/wakusei-planets/flat/system";
412
+ *
413
+ * console.log(systemCometOrbit("halley", 50).length > 20);
414
+ * ```
415
+ */
416
+ export declare function systemCometOrbit(id: string, reach: number): readonly (readonly [number, number])[];
417
+ /**
418
+ * A craft's whole path as points in the ecliptic plane, `count` steps over its record, each with its moment: what the map draws as the craft's track, the part behind the moment dashed and the part ahead solid. `[]` while the path is not loaded.
419
+ *
420
+ * @param id - The craft.
421
+ * @param count - How many steps (from 2).
422
+ * @returns Points with their moments in milliseconds since 1970.
423
+ *
424
+ * @example
425
+ * ```ts
426
+ * import { loadSpacecraft } from "@johnmorrisdotca/wakusei-planets/spacecraft";
427
+ * import { craftPath } from "@johnmorrisdotca/wakusei-planets/flat/system";
428
+ *
429
+ * await loadSpacecraft("roadster");
430
+ * const path = craftPath("roadster", 100);
431
+ * console.log(path.length, new Date(path[0]!.ms).getUTCFullYear(), new Date(path[path.length - 1]!.ms).getUTCFullYear());
432
+ * ```
433
+ */
434
+ export declare function craftPath(id: string, count?: number): {
435
+ x: number;
436
+ y: number;
437
+ ms: number;
438
+ }[];
439
+ export { SYSTEM_WORDS, saySystem } from "./system-words.ts";
440
+ export type { SystemPick, WakuseiFlatSystem } from "./system-element.ts";