spacemap 0.1.19 → 0.1.21

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/index.d.ts CHANGED
@@ -291,6 +291,7 @@ export declare interface CoreMessages {
291
291
  attribution_orbits: () => string;
292
292
  attribution_imagery: () => string;
293
293
  attribution_stars: () => string;
294
+ attribution_constellations: () => string;
294
295
  credits_see_all: () => string;
295
296
  layer_surface: () => string;
296
297
  layer_clouds: () => string;
@@ -953,6 +954,9 @@ export declare interface Host {
953
954
  messages: CoreMessages;
954
955
  /** Link target of a body's scene label. */
955
956
  bodyHref: (id: string, name: string) => string;
957
+ /** Link target of a collection page's scene label, or of a figure of the
958
+ * sky culture `slug`. */
959
+ groupHref: (slug: string, name: string, figure?: string | null) => string;
956
960
  /** How far down the `distribution` ladder this embed may draw surface maps,
957
961
  * panoramas, craft models and stars (docs/export-format/textures.md). `open` is
958
962
  * what anyone may serve, `non-commercial` adds works whose licence bars
@@ -1101,6 +1105,12 @@ export declare interface MapEvents {
1101
1105
  camera: (view: CameraState) => void;
1102
1106
  /** A nomenclature label was clicked; carries what a fly-to needs. */
1103
1107
  featureselect: (e: FeatureSelect) => void;
1108
+ /** A constellation's name was clicked; `slug` is its collection page. */
1109
+ constellationselect: (e: {
1110
+ slug: string;
1111
+ figure: string;
1112
+ name: string;
1113
+ }) => void;
1104
1114
  /** User-promoted bodies that can be cleared (the focused one excluded). */
1105
1115
  userpromoted: (count: number) => void;
1106
1116
  contextlost: () => void;
@@ -1323,6 +1333,18 @@ export declare interface OutOfRangeNotice {
1323
1333
  } | null;
1324
1334
  }
1325
1335
 
1336
+ /** The sky of a page. It leaves the reader's own layer settings alone. */
1337
+ export declare interface PageSky {
1338
+ /** The culture to draw. */
1339
+ culture: string;
1340
+ /** The figure to aim at, by its `slug`. */
1341
+ figure: string | null;
1342
+ /** Aim at once: the page opened the map. */
1343
+ opening: boolean;
1344
+ /** The reader turned the layer off on this page. */
1345
+ hidden: boolean;
1346
+ }
1347
+
1326
1348
  /** The product id, which names one panorama and no other. A stop held for
1327
1349
  * days leaves several mosaics sharing a time and a place, so the time and
1328
1350
  * place together do not. */
@@ -1785,11 +1807,22 @@ export declare interface SamplesOptions {
1785
1807
  * this structurally; an embed passes its own or takes the default. One per
1786
1808
  * page, registered through {@link setSceneSettings}: the tier and quality
1787
1809
  * helpers run deep in material code with no map instance at hand.
1810
+ *
1811
+ * A field added after a release is optional, so a host's own object stays
1812
+ * valid. {@link defaultSceneSettings} shows the default of each.
1788
1813
  */
1789
1814
  export declare interface SceneSettings {
1790
1815
  resolvedReducedMotion: boolean;
1791
1816
  viewMode: 'map' | 'immersive';
1792
1817
  showClouds: boolean;
1818
+ showConstellations?: boolean;
1819
+ /** Key of the sky culture the constellation layer draws. */
1820
+ constellationCulture?: string;
1821
+ /** What a constellation or culture page shows of the sky, for that view. */
1822
+ pageSky?: PageSky | null;
1823
+ /** The constellation layer hides the asteroids, comets and probes, and the
1824
+ * cloud of Earth satellites, which bury its faint figures. */
1825
+ clearSky?: boolean;
1793
1826
  showAtmospheres: boolean;
1794
1827
  atmosphereQuality: AtmosphereQualityTier;
1795
1828
  atmosphereAutoTier: ResolvedAtmosphereTier | null;
@@ -1844,9 +1877,13 @@ export declare interface ShapeStyle {
1844
1877
  /**
1845
1878
  * Simulation clock. Advances Julian Date by real elapsed time × timeScale;
1846
1879
  * timeScale === 0 means paused. `play()` re-resumes the previous non-zero scale.
1880
+ *
1881
+ * The clock holds only dates that a `Date` holds. A seek past them stops it at
1882
+ * the end of that range.
1847
1883
  */
1848
1884
  export declare class SimClock {
1849
1885
  jd: number;
1886
+ /* Excluded from this release type: askedJd */
1850
1887
  timeScale: number;
1851
1888
  direction: 1 | -1;
1852
1889
  /* Excluded from this release type: seeked */
@@ -1865,6 +1902,8 @@ export declare class SimClock {
1865
1902
  private arrivals;
1866
1903
  constructor(initialJd: number, live?: boolean);
1867
1904
  /* Excluded from this release type: tick */
1905
+ /** Put the clock on `jd`, or on the nearest date it can hold. */
1906
+ private move;
1868
1907
  /* Excluded from this release type: setBoundaryStops */
1869
1908
  /** Caller passes the unsigned magnitude; direction is applied here. */
1870
1909
  setTimeScale(magnitude: number): void;
@@ -1883,6 +1922,7 @@ export declare class SimClock {
1883
1922
  private settleAfterPause;
1884
1923
  /* Excluded from this release type: sweepTo */
1885
1924
  pause(): void;
1925
+ /* Excluded from this release type: hold */
1886
1926
  play(): void;
1887
1927
  /** Back to wall-clock time; live again only if playback is at 1×, since a
1888
1928
  * paused or fast clock drifts off it at once. */
@@ -1943,6 +1983,7 @@ export declare class SpaceMap {
1943
1983
  /** Whether a click on a star takes the focus. A host's map has no page to
1944
1984
  * open for a star, so it is off unless the app turns it on. */
1945
1985
  private starSelectEnabled;
1986
+ private tripPins;
1946
1987
  private limits;
1947
1988
  private initialFocusPending;
1948
1989
  private pendingFocusId;
@@ -1976,7 +2017,8 @@ export declare class SpaceMap {
1976
2017
  /** Kilometres between two places, as the last frame drew them: a body's
1977
2018
  * centre, a point on its surface, anything an anchor names. Null while
1978
2019
  * either end is on a body this map has not loaded, or one that is nowhere
1979
- * at that date. */
2020
+ * at that date, and while a point on a surface is on a body that may yet
2021
+ * turn (see {@link getSubsolarPoint}). */
1980
2022
  distanceKm(from: Anchor, to: Anchor): number | null;
1981
2023
  /** The same measure with its direction kept: from one place to the other,
1982
2024
  * in kilometres on ecliptic J2000 axes. What a held camera's `up` is made
@@ -1985,7 +2027,10 @@ export declare class SpaceMap {
1985
2027
  /** Where on `id` the Sun is overhead, as the last frame drew it: the middle
1986
2028
  * of the lit half, in the frame a surface anchor is placed in. Null for a
1987
2029
  * body not loaded, and until the map has read how it spins, which it does
1988
- * once the camera is on the body or its system. */
2030
+ * once the camera is on the body or its system. On a bad line that can
2031
+ * take longer: a moon's spin can come before the file of the terms that
2032
+ * sway it, and the map asks for that file again until it has it, or the
2033
+ * data host says it has none. */
1989
2034
  getSubsolarPoint(id: string): LonLat | null;
1990
2035
  /** Whether this map draws surface tiles at all. False where no tile host is
1991
2036
  * set, and on a device short of memory: every body then shows its
@@ -2043,6 +2088,7 @@ export declare class SpaceMap {
2043
2088
  * data of the body does not load. A later move stops this move.
2044
2089
  */
2045
2090
  jumpTo(target: JumpTarget): Promise<void>;
2091
+ /* Excluded from this release type: haloOnScreen */
2046
2092
  /** Whether `id` is in the scene, with a place at the date it shows. */
2047
2093
  private placedNow;
2048
2094
  /** The placement of {@link jumpTo}, on a body in the scene. */
@@ -2079,6 +2125,7 @@ export declare class SpaceMap {
2079
2125
  private applyLimits;
2080
2126
  private applyGestures;
2081
2127
  /* Excluded from this release type: setStarSelectEnabled */
2128
+ /* Excluded from this release type: setTripPins */
2082
2129
  /** A wheel the page is to keep never reaches the orbit controls. It is not
2083
2130
  * cancelled, so the page scrolls as it would over any other element. */
2084
2131
  private readonly onWheelCapture;
@@ -2101,6 +2148,9 @@ export declare class SpaceMap {
2101
2148
  /* Excluded from this release type: snapToBody */
2102
2149
  /* Excluded from this release type: snapToBodyFrom */
2103
2150
  /* Excluded from this release type: snapToBodyFacing */
2151
+ /* Excluded from this release type: tripView */
2152
+ /* Excluded from this release type: tripBallView */
2153
+ private vantageView;
2104
2154
  /* Excluded from this release type: focusOnFeature */
2105
2155
  /* Excluded from this release type: setFocusTarget */
2106
2156
  /** Where the camera is and what it orbits, as anchors a host can store,