astraeus 0.0.0-stage → 0.1.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 +14 -0
- package/LICENSE +21 -0
- package/NOTICE +14 -0
- package/README.md +108 -2
- package/data/ephemerides/planets/planets.json +1 -0
- package/data/moons/jupiter.json +3097 -0
- package/data/moons/neptune.json +517 -0
- package/data/moons/pluto.json +189 -0
- package/data/moons/saturn.json +7677 -0
- package/data/moons/uranus.json +825 -0
- package/data/orbits/callisto.json +192 -0
- package/data/orbits/charon.json +96 -0
- package/data/orbits/dione.json +102 -0
- package/data/orbits/enceladus.json +102 -0
- package/data/orbits/europa.json +189 -0
- package/data/orbits/ganymede.json +186 -0
- package/data/orbits/iapetus.json +102 -0
- package/data/orbits/io.json +181 -0
- package/data/orbits/mimas.json +170 -0
- package/data/orbits/rhea.json +170 -0
- package/data/orbits/tethys.json +170 -0
- package/data/orbits/titan.json +170 -0
- package/data/orbits/triton.json +230 -0
- package/data/rings/jupiter.json +24 -0
- package/data/rings/neptune.json +73 -0
- package/data/rings/saturn.json +69 -0
- package/data/rings/uranus.json +80 -0
- package/licenses/ERFA.txt +50 -0
- package/licenses/orbjs-MIT.txt +21 -0
- package/licenses/python-sgp4.txt +20 -0
- package/package.json +45 -4
- package/src/api/bodies.d.ts +40 -0
- package/src/api/bodies.js +35 -0
- package/src/api/data.d.ts +24 -0
- package/src/api/data.js +34 -0
- package/src/api/errors.d.ts +7 -0
- package/src/api/errors.js +9 -0
- package/src/api/index.d.ts +8 -0
- package/src/api/index.js +6 -0
- package/src/api/mount.d.ts +15 -0
- package/src/api/mount.js +26 -0
- package/src/api/scene.d.ts +76 -0
- package/src/api/scene.js +194 -0
- package/src/app/AnchorLabels.d.ts +17 -0
- package/src/app/AnchorLabels.js +46 -0
- package/src/app/App.d.ts +13 -0
- package/src/app/App.js +379 -0
- package/src/app/AstraeusScene.d.ts +133 -0
- package/src/app/AstraeusScene.js +47 -0
- package/src/app/AtmosphereGlow.d.ts +6 -0
- package/src/app/AtmosphereGlow.js +38 -0
- package/src/app/BodyMesh.d.ts +14 -0
- package/src/app/BodyMesh.js +20 -0
- package/src/app/BodySetLabels.d.ts +17 -0
- package/src/app/BodySetLabels.js +98 -0
- package/src/app/BodySetView.d.ts +50 -0
- package/src/app/BodySetView.js +206 -0
- package/src/app/BodyView.d.ts +37 -0
- package/src/app/BodyView.js +58 -0
- package/src/app/CameraController.d.ts +51 -0
- package/src/app/CameraController.js +163 -0
- package/src/app/DebugOverlay.d.ts +58 -0
- package/src/app/DebugOverlay.js +72 -0
- package/src/app/DeveloperSettings.d.ts +80 -0
- package/src/app/DeveloperSettings.js +40 -0
- package/src/app/FeatureMarkers.d.ts +76 -0
- package/src/app/FeatureMarkers.js +205 -0
- package/src/app/FrameRateSection.d.ts +16 -0
- package/src/app/FrameRateSection.js +35 -0
- package/src/app/KeplerPoints.d.ts +18 -0
- package/src/app/KeplerPoints.js +64 -0
- package/src/app/LayeredRender.d.ts +14 -0
- package/src/app/LayeredRender.js +35 -0
- package/src/app/OrbitSetView.d.ts +65 -0
- package/src/app/OrbitSetView.js +519 -0
- package/src/app/PathView.d.ts +135 -0
- package/src/app/PathView.js +574 -0
- package/src/app/PointsView.d.ts +103 -0
- package/src/app/PointsView.js +552 -0
- package/src/app/RingView.d.ts +34 -0
- package/src/app/RingView.js +96 -0
- package/src/app/SceneLabels.d.ts +22 -0
- package/src/app/SceneLabels.js +81 -0
- package/src/app/SettingControls.d.ts +32 -0
- package/src/app/SettingControls.js +19 -0
- package/src/app/SkyView.d.ts +63 -0
- package/src/app/SkyView.js +237 -0
- package/src/app/StoryMarkers.d.ts +38 -0
- package/src/app/StoryMarkers.js +81 -0
- package/src/app/TrackedBodyView.d.ts +36 -0
- package/src/app/TrackedBodyView.js +175 -0
- package/src/app/addressNavigation.d.ts +17 -0
- package/src/app/addressNavigation.js +16 -0
- package/src/app/bodyDraw.d.ts +118 -0
- package/src/app/bodyDraw.js +171 -0
- package/src/app/bodyMetrics.d.ts +19 -0
- package/src/app/bodyMetrics.js +85 -0
- package/src/app/bodySet.d.ts +113 -0
- package/src/app/bodySet.js +79 -0
- package/src/app/catalogueItem.d.ts +9 -0
- package/src/app/catalogueItem.js +17 -0
- package/src/app/ephemerisProvenance.d.ts +2 -0
- package/src/app/ephemerisProvenance.js +1 -0
- package/src/app/experienceDefinition.d.ts +265 -0
- package/src/app/experienceDefinition.js +257 -0
- package/src/app/floatingOrigin.d.ts +14 -0
- package/src/app/floatingOrigin.js +32 -0
- package/src/app/frameStats.d.ts +28 -0
- package/src/app/frameStats.js +68 -0
- package/src/app/keplerShader.d.ts +45 -0
- package/src/app/keplerShader.js +112 -0
- package/src/app/lighting.d.ts +9 -0
- package/src/app/lighting.js +24 -0
- package/src/app/metricReadouts.d.ts +10 -0
- package/src/app/metricReadouts.js +67 -0
- package/src/app/mission.d.ts +78 -0
- package/src/app/mission.js +80 -0
- package/src/app/pathRules.d.ts +52 -0
- package/src/app/pathRules.js +104 -0
- package/src/app/planetNeeds.d.ts +3 -0
- package/src/app/planetNeeds.js +6 -0
- package/src/app/renderCoordinates.d.ts +13 -0
- package/src/app/renderCoordinates.js +14 -0
- package/src/app/sceneBodies.d.ts +42 -0
- package/src/app/sceneBodies.js +58 -0
- package/src/app/sceneBodySets.d.ts +5 -0
- package/src/app/sceneBodySets.js +45 -0
- package/src/app/sceneCamera.d.ts +34 -0
- package/src/app/sceneCamera.js +110 -0
- package/src/app/sceneContentsHooks.d.ts +102 -0
- package/src/app/sceneContentsHooks.js +127 -0
- package/src/app/sceneDebug.d.ts +55 -0
- package/src/app/sceneDebug.js +76 -0
- package/src/app/sceneFrame.d.ts +175 -0
- package/src/app/sceneFrame.js +272 -0
- package/src/app/sceneFraming.d.ts +57 -0
- package/src/app/sceneFraming.js +99 -0
- package/src/app/sceneHooks.d.ts +28 -0
- package/src/app/sceneHooks.js +68 -0
- package/src/app/sceneLayout.d.ts +59 -0
- package/src/app/sceneLayout.js +97 -0
- package/src/app/sceneLights.d.ts +13 -0
- package/src/app/sceneLights.js +13 -0
- package/src/app/scenePicking.d.ts +97 -0
- package/src/app/scenePicking.js +102 -0
- package/src/app/scenePointer.d.ts +15 -0
- package/src/app/scenePointer.js +35 -0
- package/src/app/sceneSky.d.ts +9 -0
- package/src/app/sceneSky.js +17 -0
- package/src/app/sceneTargets.d.ts +34 -0
- package/src/app/sceneTargets.js +58 -0
- package/src/app/skyModel.d.ts +62 -0
- package/src/app/skyModel.js +114 -0
- package/src/app/style.css +206 -0
- package/src/app/useBodyTexture.d.ts +2 -0
- package/src/app/useBodyTexture.js +25 -0
- package/src/app/viewLink.d.ts +48 -0
- package/src/app/viewLink.js +117 -0
- package/src/app/viewUp.d.ts +24 -0
- package/src/app/viewUp.js +36 -0
- package/src/assets/bodies/earth.d.ts +18 -0
- package/src/assets/bodies/earth.js +33 -0
- package/src/assets/bodies/galileanMoons.d.ts +9 -0
- package/src/assets/bodies/galileanMoons.js +18 -0
- package/src/assets/bodies/io.d.ts +9 -0
- package/src/assets/bodies/io.js +12 -0
- package/src/assets/bodies/jupiter.d.ts +19 -0
- package/src/assets/bodies/jupiter.js +33 -0
- package/src/assets/bodies/jupiterMoonCatalogue.d.ts +3 -0
- package/src/assets/bodies/jupiterMoonCatalogue.js +4 -0
- package/src/assets/bodies/jupiterRings.d.ts +3 -0
- package/src/assets/bodies/jupiterRings.js +4 -0
- package/src/assets/bodies/mars.d.ts +15 -0
- package/src/assets/bodies/mars.js +29 -0
- package/src/assets/bodies/mercury.d.ts +15 -0
- package/src/assets/bodies/mercury.js +29 -0
- package/src/assets/bodies/moon.d.ts +16 -0
- package/src/assets/bodies/moon.js +30 -0
- package/src/assets/bodies/outerPlanetCatalogues.d.ts +11 -0
- package/src/assets/bodies/outerPlanetCatalogues.js +12 -0
- package/src/assets/bodies/planetSystemMaps.d.ts +18 -0
- package/src/assets/bodies/planetSystemMaps.js +65 -0
- package/src/assets/bodies/sun.d.ts +21 -0
- package/src/assets/bodies/sun.js +32 -0
- package/src/assets/bodies/swiftTuttle.d.ts +12 -0
- package/src/assets/bodies/swiftTuttle.js +13 -0
- package/src/assets/bodies/venus.d.ts +20 -0
- package/src/assets/bodies/venus.js +37 -0
- package/src/assets/catalogue.d.ts +37 -0
- package/src/assets/catalogue.js +106 -0
- package/src/assets/compositions.d.ts +52 -0
- package/src/assets/compositions.js +91 -0
- package/src/assets/licence.d.ts +44 -0
- package/src/assets/licence.js +20 -0
- package/src/assets/moonCatalogue.d.ts +47 -0
- package/src/assets/moonCatalogue.js +79 -0
- package/src/assets/orbitLook.d.ts +94 -0
- package/src/assets/orbitLook.js +46 -0
- package/src/assets/pictures.d.ts +17 -0
- package/src/assets/pictures.js +23 -0
- package/src/assets/rings.d.ts +31 -0
- package/src/assets/rings.js +45 -0
- package/src/assets/sky.d.ts +91 -0
- package/src/assets/sky.js +139 -0
- package/src/assets/stars/hyg-v42-naked-eye.json +1 -0
- package/src/assets/textures/earth-bmng-july-4k.jpg +0 -0
- package/src/assets/textures/jupiter-2k.jpg +0 -0
- package/src/assets/textures/mars-2k.jpg +0 -0
- package/src/assets/textures/mercury-2k.jpg +0 -0
- package/src/assets/textures/moon-lroc-2k.jpg +0 -0
- package/src/assets/textures/neptune-2k.jpg +0 -0
- package/src/assets/textures/saturn-2k.jpg +0 -0
- package/src/assets/textures/sun-2k.jpg +0 -0
- package/src/assets/textures/uranus-2k.jpg +0 -0
- package/src/assets/textures/venus-2k-balanced.jpg +0 -0
- package/src/assets/visual.d.ts +56 -0
- package/src/assets/visual.js +1 -0
- package/src/core/astronomyAdapter.d.ts +13 -0
- package/src/core/astronomyAdapter.js +88 -0
- package/src/core/bodies/earth.d.ts +7 -0
- package/src/core/bodies/earth.js +38 -0
- package/src/core/bodies/index.d.ts +16 -0
- package/src/core/bodies/index.js +45 -0
- package/src/core/bodies/io.d.ts +54 -0
- package/src/core/bodies/io.js +120 -0
- package/src/core/bodies/jupiter.d.ts +8 -0
- package/src/core/bodies/jupiter.js +40 -0
- package/src/core/bodies/jupiterData.d.ts +2 -0
- package/src/core/bodies/jupiterData.js +9 -0
- package/src/core/bodies/jupiterMoons.d.ts +31 -0
- package/src/core/bodies/jupiterMoons.js +44 -0
- package/src/core/bodies/mars.d.ts +6 -0
- package/src/core/bodies/mars.js +34 -0
- package/src/core/bodies/mercury.d.ts +6 -0
- package/src/core/bodies/mercury.js +32 -0
- package/src/core/bodies/moon.d.ts +3 -0
- package/src/core/bodies/moon.js +36 -0
- package/src/core/bodies/moonSystem.d.ts +98 -0
- package/src/core/bodies/moonSystem.js +151 -0
- package/src/core/bodies/outerPlanetData.d.ts +7 -0
- package/src/core/bodies/outerPlanetData.js +19 -0
- package/src/core/bodies/outerPlanets.d.ts +23 -0
- package/src/core/bodies/outerPlanets.js +68 -0
- package/src/core/bodies/planetMoons.d.ts +28 -0
- package/src/core/bodies/planetMoons.js +86 -0
- package/src/core/bodies/planetRecords.d.ts +8 -0
- package/src/core/bodies/planetRecords.js +19 -0
- package/src/core/bodies/planetTrajectory.d.ts +10 -0
- package/src/core/bodies/planetTrajectory.js +31 -0
- package/src/core/bodies/sun.d.ts +3 -0
- package/src/core/bodies/sun.js +25 -0
- package/src/core/bodies/swiftTuttle.d.ts +46 -0
- package/src/core/bodies/swiftTuttle.js +104 -0
- package/src/core/bodies/venus.d.ts +6 -0
- package/src/core/bodies/venus.js +34 -0
- package/src/core/body.d.ts +45 -0
- package/src/core/body.js +8 -0
- package/src/core/bodyOrientation.d.ts +8 -0
- package/src/core/bodyOrientation.js +92 -0
- package/src/core/chebyshev.d.ts +12 -0
- package/src/core/chebyshev.js +38 -0
- package/src/core/chebyshevEphemeris.d.ts +93 -0
- package/src/core/chebyshevEphemeris.js +344 -0
- package/src/core/chebyshevSeries.d.ts +30 -0
- package/src/core/chebyshevSeries.js +89 -0
- package/src/core/clock.d.ts +28 -0
- package/src/core/clock.js +98 -0
- package/src/core/elementsBody.d.ts +94 -0
- package/src/core/elementsBody.js +201 -0
- package/src/core/ephemerisGroup.d.ts +36 -0
- package/src/core/ephemerisGroup.js +51 -0
- package/src/core/events.d.ts +9 -0
- package/src/core/events.js +18 -0
- package/src/core/fieldReaders.d.ts +14 -0
- package/src/core/fieldReaders.js +32 -0
- package/src/core/iauRotation.d.ts +59 -0
- package/src/core/iauRotation.js +72 -0
- package/src/core/illumination.d.ts +9 -0
- package/src/core/illumination.js +54 -0
- package/src/core/keplerAnomaly.d.ts +2 -0
- package/src/core/keplerAnomaly.js +8 -0
- package/src/core/keplerElements.d.ts +35 -0
- package/src/core/keplerElements.js +87 -0
- package/src/core/listedOrbitGroup.d.ts +64 -0
- package/src/core/listedOrbitGroup.js +221 -0
- package/src/core/moonTrajectory.d.ts +11 -0
- package/src/core/moonTrajectory.js +28 -0
- package/src/core/orbitGroup.d.ts +41 -0
- package/src/core/orbitGroup.js +141 -0
- package/src/core/orbitPeriod.d.ts +25 -0
- package/src/core/orbitPeriod.js +58 -0
- package/src/core/planetModels.d.ts +7 -0
- package/src/core/planetModels.js +43 -0
- package/src/core/planetSeries.d.ts +26 -0
- package/src/core/planetSeries.js +22 -0
- package/src/core/pointGroup.d.ts +51 -0
- package/src/core/pointGroup.js +49 -0
- package/src/core/provenance.d.ts +9 -0
- package/src/core/provenance.js +14 -0
- package/src/core/referenceCenters.d.ts +6 -0
- package/src/core/referenceCenters.js +55 -0
- package/src/core/sampledTrajectory.d.ts +28 -0
- package/src/core/sampledTrajectory.js +127 -0
- package/src/core/satelliteMeanElements.d.ts +78 -0
- package/src/core/satelliteMeanElements.js +81 -0
- package/src/core/scalePolicy.d.ts +44 -0
- package/src/core/scalePolicy.js +58 -0
- package/src/core/state.d.ts +30 -0
- package/src/core/state.js +66 -0
- package/src/core/stateResolver.d.ts +16 -0
- package/src/core/stateResolver.js +126 -0
- package/src/core/sunCentredSources.d.ts +61 -0
- package/src/core/sunCentredSources.js +179 -0
- package/src/core/timeScale.d.ts +28 -0
- package/src/core/timeScale.js +81 -0
- package/src/core/timeWindow.d.ts +33 -0
- package/src/core/timeWindow.js +112 -0
- package/src/core/trajectory.d.ts +13 -0
- package/src/core/trajectory.js +1 -0
- package/src/core/twoBodyAdapter.d.ts +30 -0
- package/src/core/twoBodyAdapter.js +45 -0
- package/src/experiences/apollo11/spacecraftMetrics.d.ts +34 -0
- package/src/experiences/apollo11/spacecraftMetrics.js +142 -0
- package/src/experiences/settingsFields.d.ts +8 -0
- package/src/experiences/settingsFields.js +12 -0
- package/src/experiences/showers/showerChoice.d.ts +25 -0
- package/src/experiences/showers/showerChoice.js +19 -0
- package/src/shell/AstraeusShell.d.ts +66 -0
- package/src/shell/AstraeusShell.js +223 -0
- package/src/shell/Collapsible.d.ts +23 -0
- package/src/shell/Collapsible.js +43 -0
- package/src/shell/ControlsDrawer.d.ts +16 -0
- package/src/shell/ControlsDrawer.js +18 -0
- package/src/shell/InfoPanel.d.ts +13 -0
- package/src/shell/InfoPanel.js +20 -0
- package/src/shell/Label.d.ts +10 -0
- package/src/shell/Label.js +15 -0
- package/src/shell/MetricVisual.d.ts +5 -0
- package/src/shell/MetricVisual.js +114 -0
- package/src/shell/MoonFamilyPanel.d.ts +16 -0
- package/src/shell/MoonFamilyPanel.js +28 -0
- package/src/shell/ObjectControls.d.ts +13 -0
- package/src/shell/ObjectControls.js +18 -0
- package/src/shell/ProvenanceBadge.d.ts +5 -0
- package/src/shell/ProvenanceBadge.js +9 -0
- package/src/shell/ScaleControl.d.ts +14 -0
- package/src/shell/ScaleControl.js +99 -0
- package/src/shell/Sources.d.ts +9 -0
- package/src/shell/Sources.js +9 -0
- package/src/shell/StoryPanelView.d.ts +18 -0
- package/src/shell/StoryPanelView.js +24 -0
- package/src/shell/SwitchControl.d.ts +24 -0
- package/src/shell/SwitchControl.js +26 -0
- package/src/shell/TimelineBar.css +120 -0
- package/src/shell/TimelineBar.d.ts +48 -0
- package/src/shell/TimelineBar.js +76 -0
- package/src/shell/TopBar.css +74 -0
- package/src/shell/TopBar.d.ts +28 -0
- package/src/shell/TopBar.js +14 -0
- package/src/shell/bodyFeatures.d.ts +51 -0
- package/src/shell/bodyFeatures.js +24 -0
- package/src/shell/bootLoader.d.ts +17 -0
- package/src/shell/bootLoader.js +73 -0
- package/src/shell/controls.css +108 -0
- package/src/shell/embedded.css +36 -0
- package/src/shell/embedded.d.ts +2 -0
- package/src/shell/embedded.js +15 -0
- package/src/shell/experience.d.ts +72 -0
- package/src/shell/experience.js +1 -0
- package/src/shell/infoModel.d.ts +43 -0
- package/src/shell/infoModel.js +80 -0
- package/src/shell/metrics.d.ts +202 -0
- package/src/shell/metrics.js +224 -0
- package/src/shell/moonFamilies.d.ts +51 -0
- package/src/shell/moonFamilies.js +34 -0
- package/src/shell/objectModel.d.ts +18 -0
- package/src/shell/objectModel.js +34 -0
- package/src/shell/phone.css +179 -0
- package/src/shell/phoneLayout.d.ts +29 -0
- package/src/shell/phoneLayout.js +48 -0
- package/src/shell/scaleModel.d.ts +16 -0
- package/src/shell/scaleModel.js +42 -0
- package/src/shell/storyPanels.d.ts +69 -0
- package/src/shell/storyPanels.js +134 -0
- package/src/shell/style.css +378 -0
- package/src/shell/timelineGlow.d.ts +43 -0
- package/src/shell/timelineGlow.js +86 -0
- package/src/shell/timelineModel.d.ts +65 -0
- package/src/shell/timelineModel.js +153 -0
- package/src/shell/topBarIcons.d.ts +13 -0
- package/src/shell/topBarIcons.js +15 -0
- package/src/shell/useDrawerSwipe.d.ts +22 -0
- package/src/shell/useDrawerSwipe.js +35 -0
- package/src/shell/useDrawers.d.ts +11 -0
- package/src/shell/useDrawers.js +29 -0
- package/src/shell/useStoryPanels.d.ts +19 -0
- package/src/shell/useStoryPanels.js +55 -0
- package/src/shell/useSwipeToDismiss.d.ts +6 -0
- package/src/shell/useSwipeToDismiss.js +46 -0
- package/src/synthetic/syntheticDefinition.d.ts +5 -0
- package/src/synthetic/syntheticDefinition.js +183 -0
- package/src/synthetic/syntheticEccentricDefinition.d.ts +18 -0
- package/src/synthetic/syntheticEccentricDefinition.js +50 -0
- package/src/synthetic/syntheticListedDefinition.d.ts +20 -0
- package/src/synthetic/syntheticListedDefinition.js +135 -0
- package/src/synthetic/syntheticRingDefinition.d.ts +20 -0
- package/src/synthetic/syntheticRingDefinition.js +215 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog: astraeus
|
|
2
|
+
|
|
3
|
+
Versions follow [semantic versioning](https://semver.org). While the version starts with `0.`, the public API (the names exported from `astraeus`) may still change between minor versions; each change is listed here.
|
|
4
|
+
|
|
5
|
+
## 0.1.0 (preview)
|
|
6
|
+
|
|
7
|
+
First release.
|
|
8
|
+
|
|
9
|
+
- Public API: `Scene` (`addBody`, `addTrajectory`, `setTime`, `setScale`, `camera.follow`), `mount(element, scene, { data })`, the ready-made bodies (`sun`, `earth`, `moon`, the planets and their moons), `trueScale` and `readableScale`, `SceneError` with its codes.
|
|
10
|
+
- `mount` draws the full viewer: time controls and timeline, camera presets, scale choice, body information with provenance.
|
|
11
|
+
- `addBody(body, { orbit: true })` draws the body's orbit line (the Moon about Earth, Io about Jupiter); other bodies throw `SceneError` code `no-orbit`.
|
|
12
|
+
- `camera.follow` opens the scene already following its target.
|
|
13
|
+
- Planet positions (2010 to 2030) and the pictures of the Sun, Earth, Moon and the eight planets are included. Moon pictures, the 8k Venus map and the Milky Way are in `astraeus-data`; moon positions are in `astraeus-data-<planet>`.
|
|
14
|
+
- Needs a bundler (Vite, webpack 5 or Parcel): the compiled code keeps extensionless imports and references its pictures with `new URL(..., import.meta.url)`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ani Patke
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
astraeus: pictures, data and library notices
|
|
2
|
+
|
|
3
|
+
The Astraeus code is MIT (see LICENSE). The pictures and data below keep their own rights; each picture is recorded with its licence in the code
|
|
4
|
+
that uses it (src/assets/bodies/*.js, src/assets/sky.js). Library licences are in licenses/. Pictures and positions that ship in the optional
|
|
5
|
+
astraeus-data and astraeus-data-<planet> packages are credited in those packages.
|
|
6
|
+
|
|
7
|
+
Pictures in this package:
|
|
8
|
+
Earth: NASA Earth Observatory, Blue Marble: Next Generation (Reto Stockli).
|
|
9
|
+
Moon: NASA's Scientific Visualization Studio, CGI Moon Kit.
|
|
10
|
+
Sun, Mercury, Mars, Jupiter, Saturn, Uranus, Neptune: Solar System Scope (solarsystemscope.com/textures), CC BY 4.0, based on NASA imagery and elevation data.
|
|
11
|
+
Venus (2k map): USGS Astrogeology / NASA Magellan C3-MDIR colorized global mosaic, public domain.
|
|
12
|
+
Star catalogue: HYG database v4.2 (Hipparcos, Yale Bright Star, Gliese catalogues), astronexus (https://www.astronexus.com/projects/hyg), CC BY-SA 4.0.
|
|
13
|
+
Stars of V 6.5 or brighter kept, right ascension converted from hours to degrees; no other change. The licence covers the star file only.
|
|
14
|
+
Planet positions (data/ephemerides/planets): fits of VSOP87A series (through Orb, MIT) and JPL Horizons states (NASA/JPL-Caltech Solar System Dynamics, US Government work, used with credit).
|
package/README.md
CHANGED
|
@@ -1,3 +1,109 @@
|
|
|
1
|
-
#
|
|
1
|
+
# astraeus
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A 3D solar system for the browser. Place bodies and recorded paths in a scene, mount it, and get time controls, camera, scale choice and body information, with no React and no 3D code of your own.
|
|
4
|
+
|
|
5
|
+
> **0.1 preview.** The public API below is the promise: it is small on purpose and may still change between `0.x` versions, with every change listed in [CHANGELOG.md](./CHANGELOG.md). Anything not exported from `astraeus` is internal and may change or disappear in any release.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install astraeus
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
You need a bundler. These were each built and run with the packed packages (a scene with Saturn and Titan from `astraeus-data-saturn`): Vite 8, webpack 5 (5.112) and Parcel 2 (2.16, which needs `"@parcel/resolver-default": { "packageExports": true }` in your `package.json` so it reads the package `exports`). Others are untried. The package is plain ES modules that reference their pictures with `new URL(..., import.meta.url)`; loading it straight in Node or from a bare `<script type="module">` will not work.
|
|
14
|
+
|
|
15
|
+
## A scene in about 20 lines
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import { Scene, earth, moon, mount } from "astraeus";
|
|
19
|
+
|
|
20
|
+
// A made-up probe on a circle 120,000 km from Earth, one lap in six hours (positions in km, times as ISO text).
|
|
21
|
+
const start = Date.parse("2026-01-01T00:00:00Z");
|
|
22
|
+
const samples = Array.from({ length: 73 }, (_, i) => {
|
|
23
|
+
const angle = (i / 72) * 2 * Math.PI;
|
|
24
|
+
return { time: start + i * 300_000, positionKm: [120_000 * Math.cos(angle), 120_000 * Math.sin(angle), 0] };
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const scene = new Scene()
|
|
28
|
+
.addBody(earth)
|
|
29
|
+
.addBody(moon, { orbit: true })
|
|
30
|
+
.addTrajectory({ id: "probe", label: "Hello probe", samples })
|
|
31
|
+
.setTime("2026-01-01T00:00:00Z");
|
|
32
|
+
scene.camera.follow("probe", { distance: 110 });
|
|
33
|
+
|
|
34
|
+
mount(document.getElementById("app"), scene);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The element needs a size (for example `height: 100%` all the way up). The probe's circle and the Moon's own orbit (tilted to it, because the circle lies in the reference frame's x-y plane) are both drawn. The finished app is in the repository at `examples/hello-scene`.
|
|
38
|
+
|
|
39
|
+
## The public API
|
|
40
|
+
|
|
41
|
+
| Call | What it does |
|
|
42
|
+
|---|---|
|
|
43
|
+
| `new Scene()` | An empty scene. Every method below returns the scene, so calls chain. |
|
|
44
|
+
| `scene.addBody(body, { orbit? })` | Adds a catalogued body: a ready-made one (`sun`, `mercury`, `venus`, `earth`, `moon`, `mars`, `jupiter`, `saturn`, `uranus`, `neptune`, `pluto`, and the moons `io`, `europa`, `ganymede`, `callisto`, `mimas`, `enceladus`, `tethys`, `dione`, `rhea`, `titan`, `iapetus`, `triton`, `charon`, `phobos`, `deimos`) or its id. The first body added is the scene's centre. `{ orbit: true }` also draws its orbit line about its parent (the parent must be in the scene); in 0.1 only `moon` (about Earth) and `io` (about Jupiter) have one, others throw `no-orbit`. |
|
|
45
|
+
| `scene.addTrajectory({ id, label?, color?, center?, samples })` | A recorded path. Each sample is `{ time, positionKm, velocityKmS? }` measured from `center` (default `"earth"`); `time` is ISO text, a `Date` or Unix milliseconds. Instead of `samples` you may give `provider` (an object with `stateAt(timeUtcMs)`) and `bounds: { start, end }`. |
|
|
46
|
+
| `scene.setTime(time)` | The moment the scene opens at. |
|
|
47
|
+
| `scene.setScale(trueScale \| readableScale)` | The opening scale; the viewer can switch to the other. |
|
|
48
|
+
| `scene.camera.follow(id, { azimuthDeg?, elevationDeg?, distance? })` | Opens framed on a body or trajectory already added, and already following it. `distance` is in Earth radii. |
|
|
49
|
+
| `mount(element, scene, { data? })` | Draws the scene with the full viewer. Returns `{ ready, unmount() }`. `data` is a list of data packages (below). |
|
|
50
|
+
| `SceneError` | Thrown for bad input. `error.code` is one of the documented `SceneErrorCode` values (for example `unknown-body`, `bad-time`, `missing-data`, `no-orbit`) and the message says what to do. |
|
|
51
|
+
|
|
52
|
+
Types (`State`, `Pictures`, `TextureRef`, `AssetLicence`, `DataSource`, `TrajectoryInput` and the like) are exported for TypeScript.
|
|
53
|
+
|
|
54
|
+
## What `astraeus-data` adds
|
|
55
|
+
|
|
56
|
+
The engine alone draws the Sun, Earth, Moon and the eight planets with their pictures and positions for 2010 to 2030. Everything heavier is a separate, optional package you import and hand to `mount`, so you only download what you use. A moon-position package is thousands of small files; your build copies them as separate files and the page fetches only the ones for the time window on screen (each chunk URL ends `?no-inline`, so Vite does not paste them into your script):
|
|
57
|
+
|
|
58
|
+
| Package | Adds | Download |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| `astraeus-data` | Moon pictures (Io to Charon), the 8k Venus map, the Milky Way | about 39 MB |
|
|
61
|
+
| `astraeus-data-jupiter`, `-saturn`, `-uranus`, `-neptune`, `-mars`, `-pluto` | Moon positions for that planet's system | 2 to 40 MB each |
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
import { Scene, jupiter, io, mount } from "astraeus";
|
|
65
|
+
import { dataSource as jupiterMoons } from "astraeus-data-jupiter";
|
|
66
|
+
|
|
67
|
+
mount(el, new Scene().addBody(jupiter).addBody(io), { data: [jupiterMoons] });
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Nothing is looked up behind your back. A moon added without its data package makes `mount` throw a `missing-data` error that names the package to install; nothing is invented to fill the gap.
|
|
71
|
+
|
|
72
|
+
## What counts as internal
|
|
73
|
+
|
|
74
|
+
Only what `import ... from "astraeus"` (and `astraeus/style.css`) gives you is public. Deep imports, file paths inside the package and the repository's other workspaces (the demos and the site) are internal and may change in any release.
|
|
75
|
+
|
|
76
|
+
## Licence
|
|
77
|
+
|
|
78
|
+
MIT for the code. Pictures and data carry their own credits and licences: see `NOTICE` and `licenses/`, and each picture's `licence` record.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Working on the engine in the repository
|
|
83
|
+
|
|
84
|
+
Inside the repository the engine is used as TypeScript source (the demos and the site build it). For npm it is compiled by `npm run build:packages` into `dist/`, the folder that gets packed (`npm run check:pack` builds and checks it). `docs/RELEASING.md` is the release procedure.
|
|
85
|
+
|
|
86
|
+
## What it holds
|
|
87
|
+
|
|
88
|
+
| Folder | Purpose |
|
|
89
|
+
|---|---|
|
|
90
|
+
| `src/core/` | Scientific core: clock, frames, bodies, providers and curve-fit state. No Three.js or React. |
|
|
91
|
+
| `src/assets/` | Body catalogue, compositions, visuals, rings and sky. |
|
|
92
|
+
| `src/app/` | The scene and app adapter (floating origin, camera, paths, labels, `App`). |
|
|
93
|
+
| `src/shell/` | The generic UI: shell, top bar, timeline, drawers, info panel, story panels. |
|
|
94
|
+
| `src/experiences/` | Shared helpers a demo builds on (settings reader, metrics, switch chooser). |
|
|
95
|
+
| `src/synthetic/` | Made-up experiences that prove the plug-in contract. |
|
|
96
|
+
| `data/`, `licenses/` | Core data (bodies, ephemerides, orbits) and the notices for the libraries it uses. |
|
|
97
|
+
| `tests/` | The engine's tests, plus helpers its demos' tests reuse. |
|
|
98
|
+
|
|
99
|
+
## How a demo plugs in
|
|
100
|
+
|
|
101
|
+
A demo is a package that depends on `astraeus`, builds an `ExperienceDefinition` (type in `src/app/experienceDefinition.ts`) from its own data, and is listed by the site. It imports the engine only through the package entries in `package.json` `exports` (for example `astraeus/app/experienceDefinition`), never by a relative path into this folder.
|
|
102
|
+
|
|
103
|
+
A complete small example with no real data is `src/synthetic/syntheticDefinition.ts`: a made-up object on a tilted loop with marks, events and story panels. Read it first; the site lists it as the `synthetic` experience (`packages/astraeus-site/src/main.tsx`).
|
|
104
|
+
|
|
105
|
+
The source `exports` list is broad (one pattern per folder) for the demos and the site; the published package exports only `.` (the public API) and `./style.css`, written into `dist/package.json` from the `x-publish` block of this manifest.
|
|
106
|
+
|
|
107
|
+
## Check it alone
|
|
108
|
+
|
|
109
|
+
From the repository root, `npm run check:engine-alone` copies this package and the shared config into a scratch folder with no demo or site, then type-checks, lints and tests it there. A file or import that reaches outside the package fails the run.
|