astraeus 0.6.0 → 0.8.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 (288) hide show
  1. package/CHANGELOG.md +192 -0
  2. package/README.md +205 -34
  3. package/package.json +5 -4
  4. package/src/api/AstraeusScene.d.ts +24 -6
  5. package/src/api/AstraeusScene.js +46 -19
  6. package/src/api/AstraeusScene.node.js +46 -19
  7. package/src/api/assembleScene.d.ts +36 -0
  8. package/src/api/assembleScene.js +175 -0
  9. package/src/api/bodySetChecks.d.ts +10 -0
  10. package/src/api/bodySetChecks.js +117 -0
  11. package/src/api/bodySetInput.d.ts +81 -0
  12. package/src/api/bodySetInput.js +1 -0
  13. package/src/api/containingBlock.d.ts +6 -0
  14. package/src/api/containingBlock.js +16 -0
  15. package/src/api/data.d.ts +17 -5
  16. package/src/api/data.js +28 -10
  17. package/src/api/definitionOf.d.ts +16 -0
  18. package/src/api/definitionOf.js +20 -0
  19. package/src/api/errors.d.ts +61 -1
  20. package/src/api/frozenCopy.d.ts +6 -0
  21. package/src/api/frozenCopy.js +26 -0
  22. package/src/api/group.d.ts +8 -2
  23. package/src/api/group.js +24 -5
  24. package/src/api/index.d.ts +19 -7
  25. package/src/api/index.js +2 -2
  26. package/src/api/index.node.js +2 -2
  27. package/src/api/listeners.d.ts +5 -0
  28. package/src/api/listeners.js +25 -0
  29. package/src/api/look.d.ts +47 -0
  30. package/src/api/look.js +1 -0
  31. package/src/api/lookInput.d.ts +3 -0
  32. package/src/api/lookInput.js +41 -0
  33. package/src/api/moonPanelInput.d.ts +60 -0
  34. package/src/api/moonPanelInput.js +1 -0
  35. package/src/api/mount.d.ts +10 -16
  36. package/src/api/mount.js +27 -11
  37. package/src/api/mount.node.js +27 -11
  38. package/src/api/pathProvenance.d.ts +15 -6
  39. package/src/api/pathProvenance.js +23 -11
  40. package/src/api/pickerInput.d.ts +25 -0
  41. package/src/api/pickerInput.js +1 -0
  42. package/src/api/planBodies.d.ts +72 -0
  43. package/src/api/planBodies.js +300 -0
  44. package/src/api/planBodySets.d.ts +68 -0
  45. package/src/api/planBodySets.js +234 -0
  46. package/src/api/planCamera.d.ts +83 -0
  47. package/src/api/planCamera.js +184 -0
  48. package/src/api/planGroups.d.ts +36 -0
  49. package/src/api/planGroups.js +103 -0
  50. package/src/api/planMoonPanel.d.ts +19 -0
  51. package/src/api/planMoonPanel.js +104 -0
  52. package/src/api/planPaths.d.ts +40 -0
  53. package/src/api/planPaths.js +212 -0
  54. package/src/api/planPicker.d.ts +12 -0
  55. package/src/api/planPicker.js +40 -0
  56. package/src/api/planPlaces.d.ts +16 -0
  57. package/src/api/planPlaces.js +99 -0
  58. package/src/api/planStory.d.ts +26 -0
  59. package/src/api/planStory.js +66 -0
  60. package/src/api/planTimeline.d.ts +27 -0
  61. package/src/api/planTimeline.js +68 -0
  62. package/src/api/planViews.d.ts +25 -0
  63. package/src/api/planViews.js +35 -0
  64. package/src/api/prepared.js +4 -1
  65. package/src/api/renamedInputs.d.ts +15 -0
  66. package/src/api/renamedInputs.js +39 -0
  67. package/src/api/scene.d.ts +176 -65
  68. package/src/api/scene.js +257 -725
  69. package/src/api/sceneFreeze.d.ts +4 -0
  70. package/src/api/sceneFreeze.js +10 -0
  71. package/src/api/sceneReads.d.ts +171 -0
  72. package/src/api/sceneReads.js +6 -0
  73. package/src/api/sphereOfInfluence.d.ts +20 -0
  74. package/src/api/sphereOfInfluence.js +48 -0
  75. package/src/api/story.d.ts +49 -19
  76. package/src/api/story.js +54 -22
  77. package/src/api/sunOrbit.js +9 -11
  78. package/src/api/time.d.ts +2 -1
  79. package/src/api/time.js +2 -1
  80. package/src/api/viewerCamera.d.ts +22 -0
  81. package/src/api/viewerCamera.js +84 -0
  82. package/src/api/viewerClock.d.ts +30 -0
  83. package/src/api/viewerClock.js +85 -0
  84. package/src/api/viewerFirstDraw.d.ts +14 -0
  85. package/src/api/viewerFirstDraw.js +26 -0
  86. package/src/api/viewerHandle.d.ts +79 -0
  87. package/src/api/viewerHandle.js +31 -0
  88. package/src/api/viewerLink.d.ts +91 -13
  89. package/src/api/viewerLink.js +111 -64
  90. package/src/api/viewerLooks.d.ts +19 -0
  91. package/src/api/viewerLooks.js +37 -0
  92. package/src/api/viewerPicker.d.ts +22 -0
  93. package/src/api/viewerPicker.js +49 -0
  94. package/src/api/viewerSelection.d.ts +25 -0
  95. package/src/api/viewerSelection.js +31 -0
  96. package/src/api/viewerViews.d.ts +10 -0
  97. package/src/api/viewerViews.js +18 -0
  98. package/src/api/viewerZones.d.ts +20 -0
  99. package/src/api/viewerZones.js +47 -0
  100. package/src/api/views.d.ts +41 -0
  101. package/src/api/views.js +82 -0
  102. package/src/app/App.d.ts +5 -3
  103. package/src/app/App.js +211 -75
  104. package/src/app/App.node.js +211 -75
  105. package/src/app/AstraeusScene.d.ts +19 -2
  106. package/src/app/AstraeusScene.js +4 -4
  107. package/src/app/BodyView.d.ts +4 -1
  108. package/src/app/BodyView.js +2 -2
  109. package/src/app/CameraController.d.ts +12 -0
  110. package/src/app/CameraController.js +3 -1
  111. package/src/app/DeveloperSettings.d.ts +1 -4
  112. package/src/app/DeveloperSettings.js +6 -10
  113. package/src/app/FeatureMarkers.d.ts +4 -3
  114. package/src/app/FeatureMarkers.js +8 -13
  115. package/src/app/FrameRateSection.js +2 -1
  116. package/src/app/OrbitSetView.js +1 -1
  117. package/src/app/SettingControls.d.ts +11 -3
  118. package/src/app/SettingControls.js +10 -2
  119. package/src/app/SkyView.d.ts +3 -10
  120. package/src/app/SkyView.js +6 -28
  121. package/src/app/StoryMarkers.d.ts +4 -1
  122. package/src/app/StoryMarkers.js +3 -2
  123. package/src/app/TrackedBodyView.d.ts +1 -1
  124. package/src/app/TrackedBodyView.js +20 -11
  125. package/src/app/address.d.ts +16 -0
  126. package/src/app/address.js +31 -0
  127. package/src/app/bodyDraw.d.ts +10 -7
  128. package/src/app/bodyDraw.js +12 -32
  129. package/src/app/bodyMetrics.js +2 -2
  130. package/src/app/bodySet.d.ts +4 -20
  131. package/src/app/bodySet.js +5 -16
  132. package/src/app/debugReadout.js +1 -1
  133. package/src/app/displaySwitches.d.ts +4 -0
  134. package/src/app/displaySwitches.js +6 -0
  135. package/src/app/experienceDefinition.d.ts +14 -23
  136. package/src/app/listSwitch.d.ts +8 -14
  137. package/src/app/listSwitch.js +3 -10
  138. package/src/app/liveLook.d.ts +39 -0
  139. package/src/app/liveLook.js +66 -0
  140. package/src/app/look.d.ts +36 -0
  141. package/src/app/look.js +61 -0
  142. package/src/app/mission.d.ts +16 -3
  143. package/src/app/mission.js +16 -1
  144. package/src/app/openClock.d.ts +3 -2
  145. package/src/app/openClock.js +3 -3
  146. package/src/app/sceneCamera.d.ts +2 -0
  147. package/src/app/sceneCamera.js +23 -0
  148. package/src/app/sceneFrame.d.ts +6 -4
  149. package/src/app/sceneFrame.js +55 -14
  150. package/src/app/sceneHooks.js +3 -2
  151. package/src/app/style.css +114 -139
  152. package/src/app/trackedMetrics.d.ts +10 -3
  153. package/src/app/trackedMetrics.js +22 -11
  154. package/src/app/viewHiding.d.ts +13 -0
  155. package/src/app/viewHiding.js +37 -0
  156. package/src/app/viewLink.d.ts +10 -32
  157. package/src/app/viewLink.js +10 -49
  158. package/src/app/viewerPort.d.ts +56 -0
  159. package/src/app/views.d.ts +32 -0
  160. package/src/app/views.js +2 -0
  161. package/src/assets/bodies/galileanMoons.js +1 -2
  162. package/src/assets/bodies/io.js +2 -2
  163. package/src/assets/bodies/listedMoons.d.ts +1 -1
  164. package/src/assets/bodies/listedMoons.js +2 -3
  165. package/src/assets/bodies/planetSystemMaps.js +2 -3
  166. package/src/assets/bodies/venus.js +2 -6
  167. package/src/assets/catalogue.js +1 -2
  168. package/src/assets/licence.d.ts +3 -3
  169. package/src/assets/licence.js +3 -3
  170. package/src/assets/pictures.d.ts +15 -12
  171. package/src/assets/pictures.js +24 -20
  172. package/src/assets/sky.d.ts +6 -5
  173. package/src/assets/sky.js +6 -9
  174. package/src/assets/visual.d.ts +4 -0
  175. package/src/core/bodies/index.d.ts +0 -4
  176. package/src/core/bodies/index.js +1 -6
  177. package/src/core/bodies/jupiterData.d.ts +0 -1
  178. package/src/core/bodies/jupiterData.js +2 -5
  179. package/src/core/bodies/moonSystem.d.ts +1 -1
  180. package/src/core/bodies/moonSystem.js +102 -55
  181. package/src/core/bodies/outerPlanetRingData.js +2 -2
  182. package/src/core/bodies/planetTrajectory.js +1 -1
  183. package/src/core/bodySetFamilies.d.ts +20 -0
  184. package/src/core/bodySetFamilies.js +14 -0
  185. package/src/core/chebyshevEphemeris.js +1 -1
  186. package/src/core/elementsBody.d.ts +8 -4
  187. package/src/core/elementsBody.js +32 -11
  188. package/src/core/elementsGroup.d.ts +27 -0
  189. package/src/core/elementsGroup.js +85 -0
  190. package/src/core/events.d.ts +2 -0
  191. package/src/core/events.js +2 -0
  192. package/src/core/illumination.js +1 -1
  193. package/src/core/listedOrbitGroup.d.ts +2 -0
  194. package/src/core/listedOrbitGroup.js +11 -7
  195. package/src/core/moonListText.d.ts +6 -0
  196. package/src/core/moonListText.js +19 -0
  197. package/src/core/moonTrajectory.js +1 -1
  198. package/src/core/pacing.d.ts +38 -3
  199. package/src/core/pacing.js +55 -4
  200. package/src/core/planetModels.js +2 -2
  201. package/src/core/planetSeries.d.ts +8 -0
  202. package/src/core/planetSeries.js +16 -2
  203. package/src/core/pointGroup.js +1 -1
  204. package/src/core/provenance.d.ts +2 -1
  205. package/src/core/provenance.js +2 -2
  206. package/src/core/referenceCenters.js +5 -5
  207. package/src/core/sampledTrajectory.js +1 -1
  208. package/src/core/scalePolicy.d.ts +1 -0
  209. package/src/core/startView.d.ts +19 -0
  210. package/src/core/startView.js +28 -0
  211. package/src/core/state.d.ts +6 -2
  212. package/src/core/state.js +3 -3
  213. package/src/core/storyPanels.d.ts +63 -0
  214. package/src/core/storyPanels.js +111 -0
  215. package/src/core/sunCentredSources.d.ts +4 -0
  216. package/src/core/sunCentredSources.js +9 -2
  217. package/src/core/timeInput.d.ts +4 -0
  218. package/src/core/timeInput.js +4 -0
  219. package/src/shell/AstraeusShell.d.ts +17 -3
  220. package/src/shell/AstraeusShell.js +60 -13
  221. package/src/shell/AstraeusShell.node.js +60 -13
  222. package/src/shell/Collapsible.d.ts +4 -3
  223. package/src/shell/Collapsible.js +5 -5
  224. package/src/shell/ControlsDrawer.d.ts +1 -1
  225. package/src/shell/ControlsDrawer.js +3 -1
  226. package/src/shell/DisplaySwitches.d.ts +18 -1
  227. package/src/shell/DisplaySwitches.js +20 -6
  228. package/src/shell/InfoPanel.d.ts +3 -1
  229. package/src/shell/InfoPanel.js +5 -4
  230. package/src/shell/MoonFamilyPanel.js +1 -1
  231. package/src/shell/ObjectControls.d.ts +3 -1
  232. package/src/shell/ObjectControls.js +2 -2
  233. package/src/shell/Sources.d.ts +5 -3
  234. package/src/shell/Sources.js +5 -5
  235. package/src/shell/StoryPanelView.d.ts +4 -3
  236. package/src/shell/StoryPanelView.js +8 -6
  237. package/src/shell/SwitchControl.d.ts +5 -11
  238. package/src/shell/SwitchControl.js +2 -20
  239. package/src/shell/TimelineBar.css +84 -66
  240. package/src/shell/TimelineBar.d.ts +5 -2
  241. package/src/shell/TimelineBar.js +37 -11
  242. package/src/shell/TimelineBar.node.js +37 -11
  243. package/src/shell/TopBar.css +22 -22
  244. package/src/shell/TopBar.d.ts +9 -3
  245. package/src/shell/TopBar.js +5 -5
  246. package/src/shell/TopBar.node.js +5 -5
  247. package/src/shell/bootLoader.d.ts +4 -10
  248. package/src/shell/bootLoader.js +6 -52
  249. package/src/shell/embedded.css +18 -18
  250. package/src/shell/experience.d.ts +1 -1
  251. package/src/shell/moonFamilies.d.ts +2 -6
  252. package/src/shell/moonFamilies.js +2 -18
  253. package/src/shell/phone.css +58 -58
  254. package/src/shell/storyPanels.d.ts +2 -53
  255. package/src/shell/storyPanels.js +1 -106
  256. package/src/shell/style.css +153 -134
  257. package/src/shell/timelineModel.d.ts +13 -0
  258. package/src/shell/timelineModel.js +25 -0
  259. package/src/shell/useDrawers.d.ts +3 -2
  260. package/src/shell/useDrawers.js +4 -3
  261. package/src/shell/viewCamera.d.ts +4 -0
  262. package/src/shell/viewCamera.js +13 -0
  263. package/src/shell/viewerKeys.d.ts +8 -0
  264. package/src/shell/viewerKeys.js +16 -0
  265. package/src/synthetic/syntheticDefinition.js +20 -24
  266. package/src/synthetic/syntheticJourneyScene.js +14 -4
  267. package/src/synthetic/syntheticProbeDefinition.js +2 -1
  268. package/src/synthetic/syntheticViewsDefinition.d.ts +3 -0
  269. package/src/synthetic/syntheticViewsDefinition.js +38 -0
  270. package/data/moons/jupiter.json +0 -3333
  271. package/data/moons/neptune.json +0 -555
  272. package/data/moons/pluto.json +0 -205
  273. package/data/moons/saturn.json +0 -8267
  274. package/data/moons/uranus.json +0 -887
  275. package/src/app/addressNavigation.d.ts +0 -17
  276. package/src/app/addressNavigation.js +0 -16
  277. package/src/assets/bodies/jupiterMoonCatalogue.d.ts +0 -3
  278. package/src/assets/bodies/jupiterMoonCatalogue.js +0 -4
  279. package/src/assets/bodies/outerPlanetCatalogues.d.ts +0 -7
  280. package/src/assets/bodies/outerPlanetCatalogues.js +0 -8
  281. package/src/assets/bodies/swiftTuttle.d.ts +0 -12
  282. package/src/assets/bodies/swiftTuttle.js +0 -13
  283. package/src/assets/moonCatalogue.d.ts +0 -49
  284. package/src/assets/moonCatalogue.js +0 -80
  285. package/src/core/bodies/outerPlanetData.d.ts +0 -4
  286. package/src/core/bodies/outerPlanetData.js +0 -13
  287. package/src/core/bodies/swiftTuttle.d.ts +0 -46
  288. package/src/core/bodies/swiftTuttle.js +0 -106
@@ -1,4 +1,8 @@
1
+ import type { TimelineEvent } from "../core/events.js";
1
2
  import type { TimeBounds } from "../core/trajectory.js";
3
+ import type { CameraRequest } from "./CameraController.js";
4
+ import type { StartView } from "./viewLink.js";
5
+ import type { LookInput, LookRead } from "../api/look.js";
2
6
  /** The one clock's reading as a host sees it. */
3
7
  export interface ViewerState {
4
8
  readonly timeUtcMs: number;
@@ -7,12 +11,26 @@ export interface ViewerState {
7
11
  readonly playing: boolean;
8
12
  /** Only in a scene with pacing: true while pacing sets the rate, false once a visitor or the host has picked a speed. */
9
13
  readonly auto?: boolean;
14
+ /** Only in a scene with views: the id of the view showing. */
15
+ readonly view?: string;
16
+ /** Only in a scene with event zones: the ids of the events whose zone holds the time, among the zones the showing view has. */
17
+ readonly zones?: readonly string[];
18
+ /** The id of the object whose information the viewer has selected; absent when nothing is selected. */
19
+ readonly selected?: string;
20
+ /** The id of the scale showing. */
21
+ readonly scale: string;
22
+ /** The looks in force, every one filled in. */
23
+ readonly look: LookRead;
24
+ /** The display switches the scene placed (those with something to act on), each on or off; empty when it placed none. */
25
+ readonly switches: Readonly<Record<string, boolean>>;
10
26
  }
11
27
  /** Who moved the clock: the clock running (`playback`), a person at the controls (`visitor`) or the host page (`host`). */
12
28
  export type ViewerChangeCause = "playback" | "visitor" | "host";
13
29
  /** What a mounted viewer lets the host do to its one clock. Seeking and rate changes go through the viewer's own handlers, so there is no second clock. */
14
30
  export interface ViewerControl {
15
31
  readonly window: TimeBounds;
32
+ /** The scene's events, which name what a zone is about (`type`, `object`). */
33
+ readonly events: readonly TimelineEvent[];
16
34
  /** The speeds the timeline offers. */
17
35
  readonly rates: readonly number[];
18
36
  read(): ViewerState;
@@ -21,6 +39,34 @@ export interface ViewerControl {
21
39
  readonly paced: boolean;
22
40
  /** A number is a chosen speed; `"auto"` gives the rate back to the scene's pacing. */
23
41
  setRate(rate: number | "auto"): void;
42
+ /** True: the visitor has a play control; false in a scene without a timeline (`setTimeline({ none: true })`), where `setPlaying` is refused. */
43
+ readonly playable: boolean;
44
+ /** Plays or pauses the one clock, as the visitor's play button does. */
45
+ setPlaying(playing: boolean): void;
46
+ /** The ids of the scene's views, in order; empty without views. */
47
+ readonly views: readonly string[];
48
+ /** Switches to the view with this id (one of `views`), as a visitor's button does. */
49
+ setView(id: string): void;
50
+ /** The ids of the scales the viewer offers, in order. */
51
+ readonly scales: readonly string[];
52
+ /** Switches to the scale with this id (one of `scales`), as a visitor's scale buttons do. */
53
+ setScale(id: string): void;
54
+ /** Sets the whole look (already checked); a look not named takes its default. A live set wins over the page address, which only starts the viewer. */
55
+ setLook(look: LookInput): void;
56
+ /** Turns the display switch `id` (one of the keys of `read().switches`) on or off, as a visitor's switch does. */
57
+ setSwitch(id: string, on: boolean): void;
58
+ /** The host's picker (`Scene.setPicker`): its id, the option values and the one pressed at the start; absent without a picker. */
59
+ readonly picker?: {
60
+ readonly id: string;
61
+ readonly values: readonly string[];
62
+ readonly start: string;
63
+ };
64
+ /** The ids of the objects the showing view shows, which a host may point the camera at. */
65
+ cameraTargets(): readonly string[];
66
+ /** The camera as the viewer's view link writes it; undefined until the scene has drawn its first frame. */
67
+ readCamera(): StartView | undefined;
68
+ /** Asks the scene camera for a follow, focus or pose through its own request path (the same one a view's camera rule uses). */
69
+ setCamera(request: CameraRequest): void;
24
70
  }
25
71
  /** The viewer's side of the host link; the public API supplies the implementation (`ViewerLink`). */
26
72
  export interface ViewerPort {
@@ -30,4 +76,14 @@ export interface ViewerPort {
30
76
  detach(): void;
31
77
  /** The viewer reports the clock's current reading; the link tells the host only when it differs from the last one. */
32
78
  publish(state: ViewerState, cause: ViewerChangeCause): void;
79
+ /** The viewer's selected object changed. `byMove`: the selection followed a move of the clock or the view (a drop, or a view rule's framing target; the cause is whatever last moved them); otherwise the visitor chose it. */
80
+ publishSelection(state: ViewerState, byMove: boolean): void;
81
+ /** The pressed option of the host's picker now (undefined until attached and without a picker). */
82
+ pickNow(): string | undefined;
83
+ /** Calls `watcher` when the pressed option moves (the host's `setPick`, or an attach or detach); returns the function that stops it. */
84
+ watchPick(watcher: () => void): () => void;
85
+ /** A visitor pressed an option of the picker other than the pressed one; the link tells the host's `onPick` listeners. */
86
+ picked(value: string): void;
87
+ /** The scene has drawn its first frame; the link tells the host's `onFirstDraw` listeners. */
88
+ firstDraw(): void;
33
89
  }
@@ -0,0 +1,32 @@
1
+ /** Where the view choice shows: a button group in the top bar, or a row in the one switch panel opened from the bar (as for the display switches). */
2
+ export declare const VIEW_PLACES: readonly ["top-bar", "panel"];
3
+ /** Where the view choice shows: "top-bar" or "panel". */
4
+ export type ViewPlace = (typeof VIEW_PLACES)[number];
5
+ /** What the camera does when it switches to a view whose members no longer include what it follows or focuses on. `stay`: keep the pose and stop following. `start`: take the view's own framing, else the scene's start. */
6
+ export type ViewCameraRule = {
7
+ readonly rule: "stay";
8
+ } | {
9
+ readonly rule: "start";
10
+ readonly framing?: {
11
+ readonly follow: string;
12
+ } | {
13
+ readonly focus: string;
14
+ };
15
+ };
16
+ /** One view, resolved once when the scene is built. The sets hold every id of that kind the view shows (an id no view names is in every view's set); switching only changes which set is read. */
17
+ export interface ResolvedView {
18
+ readonly id: string;
19
+ readonly label: string;
20
+ readonly camera: ViewCameraRule;
21
+ /** Bodies, paths and groups: the ids the menu lists and the scene draws. */
22
+ readonly objects: ReadonlySet<string>;
23
+ readonly events: ReadonlySet<string>;
24
+ readonly panels: ReadonlySet<string>;
25
+ }
26
+ /** The views a scene names: presentation only (no State changes), so a hidden object keeps its state. */
27
+ export interface ViewSettings {
28
+ readonly place: ViewPlace;
29
+ /** Id of the opening view. */
30
+ readonly start: string;
31
+ readonly views: readonly ResolvedView[];
32
+ }
@@ -0,0 +1,2 @@
1
+ /** Where the view choice shows: a button group in the top bar, or a row in the one switch panel opened from the bar (as for the display switches). */
2
+ export const VIEW_PLACES = ["top-bar", "panel"];
@@ -1,12 +1,11 @@
1
1
  import { CALLISTO, EUROPA, GANYMEDE } from "../../core/bodies/jupiterMoons.js";
2
- import { withPicture } from "../pictures.js";
3
2
  /**
4
3
  * Europa, Ganymede and Callisto as Planetary Explorer draws them (the owner's own project, donor commit 84f8d3e): the donor's 2048x1024
5
4
  * maps copied byte for byte (SHA-256 equal to data/bodies/<moon>/map.json) and the donor materials, lit like Io. Sources and licences are
6
5
  * the donor's public/textures/README.md entries, read 2026-10-18 from the local donor checkout; the USGS pages were not opened.
7
6
  */
8
7
  const LIGHT = Object.freeze({ ambient: 0.08, directional: 1.4 });
9
- const visual = (picture, material, textureYawRad) => withPicture(picture, { kind: "sphere", material: Object.freeze(material), textureYawRad, light: LIGHT });
8
+ const visual = (picture, material, textureYawRad) => Object.freeze({ kind: "sphere", picture, material: Object.freeze(material), textureYawRad, light: LIGHT });
10
9
  export const EUROPA_VISUAL = visual("europa", { color: "#c8b898", roughness: 0.96, metalness: 0 }, Math.PI);
11
10
  /** The donor's Ganymede picture is recentred by 180 degrees against the mosaic (data/bodies/ganymede/map.json textureRecentringDeg), so it is centred on 0 E like Io's and needs no turn (O-039 T-131). Europa and Callisto are centred on 180 E and turn half a revolution. */
12
11
  export const GANYMEDE_VISUAL = visual("ganymede", { color: "#887868", roughness: 0.95, metalness: 0 }, 0);
@@ -1,10 +1,10 @@
1
1
  import { IO } from "../../core/bodies/io.js";
2
- import { withPicture } from "../pictures.js";
3
2
  /** Donor material (src/entities/io.ts), used as the flat colour while the texture loads and as the shell colour. */
4
3
  export const IO_MATERIAL = Object.freeze({ color: "#d4b840", roughness: 0.92, metalness: 0 });
5
4
  /** Io's picture (and its licence) ships in astraeus-data under the name "io". */
6
- export const IO_VISUAL = withPicture("io", {
5
+ export const IO_VISUAL = Object.freeze({
7
6
  kind: "sphere",
7
+ picture: "io",
8
8
  material: IO_MATERIAL,
9
9
  textureYawRad: 0,
10
10
  light: Object.freeze({ ambient: 0.08, directional: 1.4 }),
@@ -1,4 +1,4 @@
1
1
  import type { ListedMoonBody } from "../../core/bodies/listedMoonBodies.js";
2
2
  import type { VisualEntry } from "../catalogue.js";
3
- /** A listed moon's look (O-049 T-211): a grey sphere, or its picture when the picture pack holds one under the moon's id (read when asked for, so a pack registered later still shows). */
3
+ /** A listed moon's look (O-049 T-211): a grey sphere, or its picture when the picture pack holds one under the moon's id (named here, resolved from the pictures the viewer is given). */
4
4
  export declare const listedMoonEntry: ({ definition }: ListedMoonBody) => VisualEntry;
@@ -1,7 +1,6 @@
1
- import { withPicture } from "../pictures.js";
2
1
  const LIGHT = Object.freeze({ ambient: 0.08, directional: 1.4 });
3
- /** A listed moon's look (O-049 T-211): a grey sphere, or its picture when the picture pack holds one under the moon's id (read when asked for, so a pack registered later still shows). */
2
+ /** A listed moon's look (O-049 T-211): a grey sphere, or its picture when the picture pack holds one under the moon's id (named here, resolved from the pictures the viewer is given). */
4
3
  export const listedMoonEntry = ({ definition }) => ({
5
4
  body: definition.id,
6
- visual: withPicture(definition.id, { kind: "sphere", material: Object.freeze({ color: "#a8a8a8", roughness: 0.95, metalness: 0 }), light: LIGHT }),
5
+ visual: Object.freeze({ kind: "sphere", picture: definition.id, material: Object.freeze({ color: "#a8a8a8", roughness: 0.95, metalness: 0 }), light: LIGHT }),
7
6
  });
@@ -1,6 +1,5 @@
1
1
  import { NEPTUNE, PLUTO, SATURN, URANUS } from "../../core/bodies/outerPlanets.js";
2
2
  import { CHARON, DEIMOS, DIONE, ENCELADUS, IAPETUS, MIMAS, PHOBOS, RHEA, TETHYS, TITAN, TRITON } from "../../core/bodies/planetMoons.js";
3
- import { withPicture } from "../pictures.js";
4
3
  const neptuneUrl = new URL("../textures/neptune-2k.jpg", import.meta.url).href;
5
4
  const saturnUrl = new URL("../textures/saturn-2k.jpg", import.meta.url).href;
6
5
  const uranusUrl = new URL("../textures/uranus-2k.jpg", import.meta.url).href;
@@ -30,10 +29,10 @@ const sphere = (url, widthPx, heightPx, licence, color, roughness, textureYawRad
30
29
  textureYawRad,
31
30
  light: LIGHT,
32
31
  });
33
- /** A sphere whose picture (and its licence) ships in astraeus-data and is registered by name; without it the sphere is a flat colour. */
32
+ /** A sphere whose picture (and its licence) ships in astraeus-data and is named by the look; without it in the viewer's pictures the sphere is a flat colour. */
34
33
  /** A planet drawn with its rings: the ring bands (and their recorded sources) belong to the planet's one catalogue definition. */
35
34
  const ringed = (visual, rings) => Object.freeze({ ...visual, rings });
36
- const pictured = (picture, color, roughness, textureYawRad = 0) => withPicture(picture, { kind: "sphere", material: Object.freeze({ color, roughness, metalness: 0 }), textureYawRad, light: LIGHT });
35
+ const pictured = (picture, color, roughness, textureYawRad = 0) => Object.freeze({ kind: "sphere", picture, material: Object.freeze({ color, roughness, metalness: 0 }), textureYawRad, light: LIGHT });
37
36
  /** Phobos and Deimos: grey spheres at their mean radius, with no map (the donor draws them as dots; no map of either is shipped). */
38
37
  const greyBall = (color) => Object.freeze({ kind: "sphere", material: Object.freeze({ color, roughness: 0.97, metalness: 0 }), light: LIGHT });
39
38
  export const SATURN_VISUAL = ringed(sphere(saturnUrl, 2048, 1024, solarSystemScope("Saturn", "Solar System Scope Saturn texture (donor saturn-2k.jpg, derived locally from its saturn-4k.jpg, which is the 4096x2048 file the Solar System Scope download endpoint gave; donor README: License CC BY 4.0 per the Solar System Scope textures page)"), "#d8c090", 0.85), SATURN_RINGS);
@@ -1,6 +1,5 @@
1
1
  import { VENUS } from "../../core/bodies/venus.js";
2
2
  const venus2kUrl = new URL("../textures/venus-2k-balanced.jpg", import.meta.url).href;
3
- import { pictureOf } from "../pictures.js";
4
3
  /** Donor material (planetary-explorer src/entities/venus.ts, commit 84f8d3ee). */
5
4
  export const VENUS_MATERIAL = Object.freeze({ color: "#f6e1b9", emissive: "#4f2e16", emissiveIntensity: 0.04, roughness: 0.9, metalness: 0.04 });
6
5
  /** Donor lighting, same file. */
@@ -21,15 +20,12 @@ export const VENUS_TEXTURE = Object.freeze({
21
20
  widthPx: 2048,
22
21
  heightPx: 1024,
23
22
  licence: VENUS_TEXTURE_LICENCE,
24
- /** The 8k file ships in astraeus-data (name "venus-8k"); without it the 2k file is used at every width. */
25
- get desktop() {
26
- const large = pictureOf("venus-8k");
27
- return large === undefined ? undefined : { url: large.url, widthPx: large.widthPx, heightPx: large.heightPx, minViewportWidth: 768 };
28
- },
29
23
  });
30
24
  export const VENUS_VISUAL = Object.freeze({
31
25
  kind: "sphere",
32
26
  texture: VENUS_TEXTURE,
27
+ /** The 8k file ships in astraeus-data (name "venus-8k"); a viewer without it uses the 2k file at every width. */
28
+ desktopPicture: "venus-8k",
33
29
  material: VENUS_MATERIAL,
34
30
  textureYawRad: 0,
35
31
  light: VENUS_LIGHT,
@@ -10,7 +10,6 @@ import { MERCURY_ENTRY } from "./bodies/mercury.js";
10
10
  import { MOON_ENTRY } from "./bodies/moon.js";
11
11
  import { PLANET_SYSTEM_ENTRIES } from "./bodies/planetSystemMaps.js";
12
12
  import { SUN_ENTRY } from "./bodies/sun.js";
13
- import { SWIFT_TUTTLE_ENTRY } from "./bodies/swiftTuttle.js";
14
13
  import { VENUS_ENTRY } from "./bodies/venus.js";
15
14
  import { textureRightsProblem } from "./licence.js";
16
15
  export class AssetCatalogueError extends RangeError {
@@ -111,4 +110,4 @@ export function rootBodyId(source = catalogue) {
111
110
  return root.id;
112
111
  }
113
112
  /** Explicit, import-built, no discovery. */
114
- export const catalogue = createCatalogue(BUILT_IN_BODIES, BUILT_IN_BINDINGS, [SUN_ENTRY, EARTH_ENTRY, MOON_ENTRY, MERCURY_ENTRY, VENUS_ENTRY, MARS_ENTRY, JUPITER_ENTRY, IO_ENTRY, ...GALILEAN_ENTRIES, ...PLANET_SYSTEM_ENTRIES, SWIFT_TUTTLE_ENTRY]);
113
+ export const catalogue = createCatalogue(BUILT_IN_BODIES, BUILT_IN_BINDINGS, [SUN_ENTRY, EARTH_ENTRY, MOON_ENTRY, MERCURY_ENTRY, VENUS_ENTRY, MARS_ENTRY, JUPITER_ENTRY, IO_ENTRY, ...GALILEAN_ENTRIES, ...PLANET_SYSTEM_ENTRIES]);
@@ -30,7 +30,7 @@ export interface TextureRef {
30
30
  readonly url: string;
31
31
  readonly widthPx: number;
32
32
  readonly heightPx: number;
33
- readonly minViewportWidth: number;
33
+ readonly minViewportWidthPx: number;
34
34
  };
35
35
  /** Rights for public distribution. Required unless the texture is declared local-only. */
36
36
  readonly licence?: AssetLicence;
@@ -39,7 +39,7 @@ export interface TextureRef {
39
39
  /** Why a texture fails the rights rule, or null when it has exactly one of licence and localOnly. */
40
40
  export declare function textureRightsProblem(texture: TextureRef): string | null;
41
41
  /**
42
- * The file to load for a viewport width, as the donor's usePlanetTexture does: the desktop variant from its minimum width up, the base file
42
+ * The file to load for a viewport width in CSS pixels (`window.innerWidth`), as the donor's usePlanetTexture does: the desktop variant from its minimum width up, the base file
43
43
  * below it. No width (no window) means the widest, as in the donor.
44
44
  */
45
- export declare function textureUrlFor(texture: TextureRef, viewportWidth?: number): string;
45
+ export declare function textureUrlFor(texture: TextureRef, viewportWidthPx?: number): string;
@@ -11,10 +11,10 @@ export function textureRightsProblem(texture) {
11
11
  return null;
12
12
  }
13
13
  /**
14
- * The file to load for a viewport width, as the donor's usePlanetTexture does: the desktop variant from its minimum width up, the base file
14
+ * The file to load for a viewport width in CSS pixels (`window.innerWidth`), as the donor's usePlanetTexture does: the desktop variant from its minimum width up, the base file
15
15
  * below it. No width (no window) means the widest, as in the donor.
16
16
  */
17
- export function textureUrlFor(texture, viewportWidth = Number.POSITIVE_INFINITY) {
17
+ export function textureUrlFor(texture, viewportWidthPx = Number.POSITIVE_INFINITY) {
18
18
  const { desktop } = texture;
19
- return desktop !== undefined && viewportWidth >= desktop.minViewportWidth ? desktop.url : texture.url;
19
+ return desktop !== undefined && viewportWidthPx >= desktop.minViewportWidthPx ? desktop.url : texture.url;
20
20
  }
@@ -1,17 +1,20 @@
1
- import type { TextureRef } from "./licence.js";
1
+ import { type TextureRef } from "./licence.js";
2
2
  import type { BodyVisual } from "./visual.js";
3
3
  /**
4
4
  * Pictures that ship in a data package (`astraeus-data`) rather than in the engine, by name: a body id (`titan`), `venus-8k`, `milky-way`.
5
- * Each carries its own licence record, so the credit travels with the file (PROV-02). A picture that was never registered is simply absent:
6
- * the body is drawn as a flat colour, the sky without its Milky Way (DATA-01: nothing is invented to fill the gap).
5
+ * Each carries its own licence record, so the credit travels with the file (PROV-02). A viewer draws only the pictures of the packages passed to it
6
+ * (its definition's `pictures`): a picture that was not passed is simply absent, so the body is drawn as a flat colour and the sky without its
7
+ * Milky Way (DATA-01: nothing is invented to fill the gap), and one viewer's pictures never reach another's.
7
8
  */
8
9
  export type Pictures = Readonly<Record<string, TextureRef>>;
9
- /** Makes a package's pictures known; later calls add to or replace earlier ones of the same name. */
10
- export declare function registerPictures(set: Pictures): void;
11
- export declare function pictureOf(name: string): TextureRef | undefined;
12
- /** The names registered so far, for tests and error messages. */
13
- export declare function registeredPictures(): readonly string[];
14
- /** Forgets every registered picture (tests only). */
15
- export declare function clearPictures(): void;
16
- /** A visual whose `texture` is read from the registered picture when asked for, so it picks the picture up whenever the data package is registered. */
17
- export declare function withPicture(name: string, visual: Omit<BodyVisual, "texture">): BodyVisual;
10
+ /** No pictures: what a viewer given no data package draws with. */
11
+ export declare const NO_PICTURES: Pictures;
12
+ /** The pictures of several packages as one set; a later package's picture of the same name replaces an earlier one's. */
13
+ export declare function mergePictures(sets: readonly (Pictures | undefined)[]): Pictures;
14
+ /** The first picture in the set that fails the rights rule, as "<name> <problem>", or null when every one has exactly one of licence and local-only. */
15
+ export declare function picturesProblem(pictures: Pictures): string | null;
16
+ /**
17
+ * The picture a look draws with, from the pictures this viewer was given: the look's own texture (an engine file) when it has one, else the picture it
18
+ * names. A named large variant (`desktopPicture`) is added to the texture as its desktop file when the viewer holds it. Undefined: flat colour.
19
+ */
20
+ export declare function textureOf(visual: BodyVisual, pictures: Pictures): TextureRef | undefined;
@@ -1,23 +1,27 @@
1
- const book = new Map();
2
- /** Makes a package's pictures known; later calls add to or replace earlier ones of the same name. */
3
- export function registerPictures(set) {
4
- for (const [name, texture] of Object.entries(set))
5
- book.set(name, texture);
1
+ import { textureRightsProblem } from "./licence.js";
2
+ /** No pictures: what a viewer given no data package draws with. */
3
+ export const NO_PICTURES = Object.freeze({});
4
+ /** The pictures of several packages as one set; a later package's picture of the same name replaces an earlier one's. */
5
+ export function mergePictures(sets) {
6
+ return Object.freeze(Object.assign({}, ...sets.map((set) => set ?? {})));
6
7
  }
7
- export function pictureOf(name) {
8
- return book.get(name);
8
+ /** The first picture in the set that fails the rights rule, as "<name> <problem>", or null when every one has exactly one of licence and local-only. */
9
+ export function picturesProblem(pictures) {
10
+ for (const [name, texture] of Object.entries(pictures)) {
11
+ const problem = textureRightsProblem(texture);
12
+ if (problem !== null)
13
+ return `the picture "${name}" ${problem}`;
14
+ }
15
+ return null;
9
16
  }
10
- /** The names registered so far, for tests and error messages. */
11
- export function registeredPictures() {
12
- return [...book.keys()];
13
- }
14
- /** Forgets every registered picture (tests only). */
15
- export function clearPictures() {
16
- book.clear();
17
- }
18
- /** A visual whose `texture` is read from the registered picture when asked for, so it picks the picture up whenever the data package is registered. */
19
- export function withPicture(name, visual) {
20
- const look = { ...visual };
21
- Object.defineProperty(look, "texture", { enumerable: true, get: () => pictureOf(name) });
22
- return Object.freeze(look);
17
+ /**
18
+ * The picture a look draws with, from the pictures this viewer was given: the look's own texture (an engine file) when it has one, else the picture it
19
+ * names. A named large variant (`desktopPicture`) is added to the texture as its desktop file when the viewer holds it. Undefined: flat colour.
20
+ */
21
+ export function textureOf(visual, pictures) {
22
+ const base = visual.texture ?? (visual.picture === undefined ? undefined : pictures[visual.picture]);
23
+ if (base === undefined || visual.desktopPicture === undefined)
24
+ return base;
25
+ const large = pictures[visual.desktopPicture];
26
+ return large === undefined ? base : { ...base, desktop: { url: large.url, widthPx: large.widthPx, heightPx: large.heightPx, minViewportWidthPx: 768 } };
23
27
  }
@@ -1,4 +1,5 @@
1
1
  import type { AssetLicence, TextureRef } from "./licence.js";
2
+ import type { Pictures } from "./pictures.js";
2
3
  /** IAU 1958 galactic frame carried to J2000 (Astropy `galactic.py`, citing Blaauw et al. 1960; read 2026-10-13). */
3
4
  export declare const GALACTIC_NORTH_POLE: Readonly<{
4
5
  raDeg: 192.8594812065348;
@@ -71,12 +72,12 @@ export declare function starAppearance(vMag: number): {
71
72
  readonly brightness: number;
72
73
  };
73
74
  /**
74
- * The picture, one 3840x1920 image (under every GPU's texture limit). The file ships in astraeus-data (name "milky-way");
75
- * without that package the list is empty and no picture is drawn.
75
+ * The picture, one 3840x1920 image (under every GPU's texture limit). The file ships in astraeus-data (name "milky-way"); a viewer
76
+ * that was not given it has an empty list and no picture is drawn.
76
77
  */
77
- export declare const milkyWayTiles: () => readonly TextureRef[];
78
- /** The Gaia EDR3 render (stars removed) as a one-tile galactic picture: the one Milky Way picture. */
79
- export declare const MILKY_WAY_PICTURE: PictureSet;
78
+ export declare const milkyWayTiles: (pictures: Pictures) => readonly TextureRef[];
79
+ /** The Gaia EDR3 render (stars removed) as a one-tile galactic picture, from the pictures this viewer was given: the one Milky Way picture (no tiles without it). */
80
+ export declare const milkyWayPicture: (pictures: Pictures) => PictureSet;
80
81
  export declare const SKY_SOURCES: readonly string[];
81
82
  /** What an experience may say about the sky: all fields optional, default on at full brightness, with the Milky Way picture off. */
82
83
  export interface SkySettings {
package/src/assets/sky.js CHANGED
@@ -1,5 +1,4 @@
1
1
  const hygStarsUrl = new URL("./stars/hyg-v42-naked-eye.json", import.meta.url).href;
2
- import { pictureOf } from "./pictures.js";
3
2
  const RAD = Math.PI / 180;
4
3
  // ---------------------------------------------------------------- galactic frame
5
4
  /** IAU 1958 galactic frame carried to J2000 (Astropy `galactic.py`, citing Blaauw et al. 1960; read 2026-10-13). */
@@ -116,18 +115,16 @@ export function starAppearance(vMag) {
116
115
  }
117
116
  // ---------------------------------------------------------------- sources and the shell item
118
117
  /**
119
- * The picture, one 3840x1920 image (under every GPU's texture limit). The file ships in astraeus-data (name "milky-way");
120
- * without that package the list is empty and no picture is drawn.
118
+ * The picture, one 3840x1920 image (under every GPU's texture limit). The file ships in astraeus-data (name "milky-way"); a viewer
119
+ * that was not given it has an empty list and no picture is drawn.
121
120
  */
122
- export const milkyWayTiles = () => ["milky-way"].flatMap((name) => pictureOf(name) ?? []);
123
- /** The Gaia EDR3 render (stars removed) as a one-tile galactic picture: the one Milky Way picture. */
124
- export const MILKY_WAY_PICTURE = Object.freeze({
121
+ export const milkyWayTiles = (pictures) => ["milky-way"].flatMap((name) => pictures[name] ?? []);
122
+ /** The Gaia EDR3 render (stars removed) as a one-tile galactic picture, from the pictures this viewer was given: the one Milky Way picture (no tiles without it). */
123
+ export const milkyWayPicture = (pictures) => Object.freeze({
125
124
  name: "Milky Way, Gaia EDR3 render without foreground stars (Kevinmloch)",
126
125
  columns: 1,
127
126
  rows: 1,
128
- get tiles() {
129
- return milkyWayTiles().map((tile) => Object.freeze({ column: 0, row: 0, url: tile.url, widthPx: tile.widthPx, heightPx: tile.heightPx }));
130
- },
127
+ tiles: milkyWayTiles(pictures).map((tile) => Object.freeze({ column: 0, row: 0, url: tile.url, widthPx: tile.widthPx, heightPx: tile.heightPx })),
131
128
  credit: "Kevinmloch (bsrender), Gaia EDR3, ESA/Gaia/DPAC",
132
129
  licence: "CC BY-SA 4.0",
133
130
  source: "https://commons.wikimedia.org/wiki/File:Milky_Way_360_equirectangular_rendering_with_foreground_stars_removed.png",
@@ -24,6 +24,10 @@ export interface BodyVisual {
24
24
  readonly kind: "sphere" | "marker";
25
25
  /** Sphere only; absent means a flat colour from the material. */
26
26
  readonly texture?: TextureRef;
27
+ /** Sphere only: the name of a picture the viewer is given by a data package (`titan`), used when there is no `texture`; absent from the viewer's pictures means a flat colour. */
28
+ readonly picture?: string;
29
+ /** Sphere only: the name of a larger picture for wide viewports (`venus-8k`), used as the texture's desktop file when the viewer holds it. */
30
+ readonly desktopPicture?: string;
27
31
  readonly material: BodyMaterialConfig;
28
32
  /** Presentation-only yaw about the body's pole, aligning the image to the body-fixed axes. */
29
33
  readonly textureYawRad?: number;
@@ -1,9 +1,7 @@
1
1
  import type { CelestialBodyDefinition, StateSourceBinding } from "../body.js";
2
- import type { EccentricSampling } from "../sunCentredSources.js";
3
2
  export { EARTH, EARTH_EPHEMERIS } from "./earth.js";
4
3
  export { MOON, MOON_EPHEMERIS } from "./moon.js";
5
4
  export { SUN } from "./sun.js";
6
- export { SWIFT_TUTTLE, SWIFT_TUTTLE_SAMPLING } from "./swiftTuttle.js";
7
5
  export { IO } from "./io.js";
8
6
  export { CALLISTO, EUROPA, GANYMEDE } from "./jupiterMoons.js";
9
7
  export { JUPITER, JUPITER_EPHEMERIS, JUPITER_ROTATION } from "./jupiter.js";
@@ -15,5 +13,3 @@ export { VENUS, VENUS_EPHEMERIS, VENUS_ROTATION } from "./venus.js";
15
13
  export declare const BUILT_IN_BODIES: readonly CelestialBodyDefinition[];
16
14
  /** One state source per non-root body; the Sun is the root and has none. */
17
15
  export declare const BUILT_IN_BINDINGS: readonly StateSourceBinding[];
18
- /** Built-in bodies whose period and periapsis the catalogue knows (a comet's century-long orbit), so their whole orbit can be drawn from periapsis. */
19
- export declare const BUILT_IN_SAMPLING: Readonly<Record<string, EccentricSampling>>;
@@ -11,12 +11,10 @@ import { MERCURY, MERCURY_ROTATION } from "./mercury.js";
11
11
  import { NEPTUNE, NEPTUNE_ROTATION, PLUTO, SATURN, SATURN_ROTATION, URANUS, URANUS_ROTATION } from "./outerPlanets.js";
12
12
  import { PLANET_MOON_BINDINGS, PLANET_MOON_DEFINITIONS, PLUTO_BINDING } from "./planetMoons.js";
13
13
  import { SUN } from "./sun.js";
14
- import { SWIFT_TUTTLE, SWIFT_TUTTLE_BINDING, SWIFT_TUTTLE_SAMPLING } from "./swiftTuttle.js";
15
14
  import { VENUS, VENUS_ROTATION } from "./venus.js";
16
15
  export { EARTH, EARTH_EPHEMERIS } from "./earth.js";
17
16
  export { MOON, MOON_EPHEMERIS } from "./moon.js";
18
17
  export { SUN } from "./sun.js";
19
- export { SWIFT_TUTTLE, SWIFT_TUTTLE_SAMPLING } from "./swiftTuttle.js";
20
18
  export { IO } from "./io.js";
21
19
  export { CALLISTO, EUROPA, GANYMEDE } from "./jupiterMoons.js";
22
20
  export { JUPITER, JUPITER_EPHEMERIS, JUPITER_ROTATION } from "./jupiter.js";
@@ -25,7 +23,7 @@ export { MERCURY, MERCURY_EPHEMERIS, MERCURY_ROTATION } from "./mercury.js";
25
23
  export { NEPTUNE, PLUTO, SATURN, URANUS } from "./outerPlanets.js";
26
24
  export { VENUS, VENUS_EPHEMERIS, VENUS_ROTATION } from "./venus.js";
27
25
  /** Every body the engine knows, defined once. */
28
- export const BUILT_IN_BODIES = Object.freeze([SUN, EARTH, MOON, MERCURY, VENUS, MARS, JUPITER, IO, EUROPA, GANYMEDE, CALLISTO, SATURN, URANUS, NEPTUNE, PLUTO, ...PLANET_MOON_DEFINITIONS, SWIFT_TUTTLE]);
26
+ export const BUILT_IN_BODIES = Object.freeze([SUN, EARTH, MOON, MERCURY, VENUS, MARS, JUPITER, IO, EUROPA, GANYMEDE, CALLISTO, SATURN, URANUS, NEPTUNE, PLUTO, ...PLANET_MOON_DEFINITIONS]);
29
27
  /** One state source per non-root body; the Sun is the root and has none. */
30
28
  export const BUILT_IN_BINDINGS = Object.freeze([
31
29
  Object.freeze({ body: EARTH.id, create: createEarthSunTrajectory }),
@@ -41,7 +39,4 @@ export const BUILT_IN_BINDINGS = Object.freeze([
41
39
  IO_BINDING,
42
40
  ...MAPPED_MOON_BINDINGS,
43
41
  ...PLANET_MOON_BINDINGS,
44
- SWIFT_TUTTLE_BINDING,
45
42
  ]);
46
- /** Built-in bodies whose period and periapsis the catalogue knows (a comet's century-long orbit), so their whole orbit can be drawn from periapsis. */
47
- export const BUILT_IN_SAMPLING = Object.freeze({ [SWIFT_TUTTLE.id]: SWIFT_TUTTLE_SAMPLING });
@@ -1,2 +1 @@
1
- export declare const JUPITER_MOON_CATALOGUE_FILE: unknown;
2
1
  export declare const JUPITER_RING_FILE: unknown;
@@ -1,9 +1,6 @@
1
1
  /**
2
- * Jupiter's core data files as they are read (O-025 Decision 8: moon data is core): the moon list by family (data/moons/jupiter.json,
3
- * T-097) and the ring bands (data/rings/jupiter.json). Raw JSON: src/assets parses and checks them (layer rule: assets reach data
4
- * through core).
2
+ * Jupiter's core ring file as it is read (O-025 Decision 8: planet data is core): the ring bands (data/rings/jupiter.json). Raw JSON: src/assets
3
+ * parses and checks it (layer rule: assets reach data through core). The moon lists live in the planets' data packages (O-059 T-270).
5
4
  */
6
- import moonCatalogueFile from "../../../data/moons/jupiter.json" with { type: "json" };
7
5
  import ringFile from "../../../data/rings/jupiter.json" with { type: "json" };
8
- export const JUPITER_MOON_CATALOGUE_FILE = moonCatalogueFile;
9
6
  export const JUPITER_RING_FILE = ringFile;
@@ -75,7 +75,7 @@ export interface MoonSystem {
75
75
  provideIndex(loadIndex: () => Promise<unknown>): void;
76
76
  /** Hands in a set built elsewhere (tests read the committed chunks from disk). */
77
77
  install(ephemeris: ChebyshevEphemeris | null): void;
78
- /** Loads the index and only the chunks the window needs, once per page: a second call returns the first one's promise. */
78
+ /** Reads the index once, then fetches and decodes the chunks this request needs that the set does not hold or another request is not already fetching. */
79
79
  load(load: MoonSystemLoad): Promise<ChebyshevEphemeris>;
80
80
  /** One osculating orbital period (ms) of a body about the centre at `timeUtcMs`, from its fitted state; Infinity when unbound. */
81
81
  osculatingPeriodMs(ephemeris: ChebyshevEphemeris, body: BodyId, timeUtcMs: number): number;