spacemap 0.1.21 → 0.1.24

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
@@ -4,6 +4,18 @@ export declare type Anchor = InertialAnchor | SurfaceAnchor;
4
4
 
5
5
  export declare type ArrowKey = 'previous' | 'next';
6
6
 
7
+ /**
8
+ * A body drawn as a sphere wears an artist's impression, not a picture of it.
9
+ * Sent again when the body it speaks of changes, and dismissed once no such
10
+ * sphere is in view.
11
+ */
12
+ export declare interface ArtistImpressionNotice {
13
+ topic: 'artist-impression';
14
+ /** The body: the focused one when it wears an impression, else the
15
+ * nearest that does. */
16
+ id: string;
17
+ }
18
+
7
19
  /** Boot-time benchmark result (see perf/atmosphere-calibration.ts). */
8
20
  declare interface AtmosphereCalibration {
9
21
  /** GPU + resolution identity the run is valid for — a mismatch re-calibrates. */
@@ -95,6 +107,18 @@ export declare type BodyType = 'barycenter' | 'lagrange-point' | 'star' | 'plane
95
107
  * the edges are walked and left for {@link pathFor} to fill in. */
96
108
  export declare function boxRing(latMin: number, latMax: number, lonMin: number, lonSpan: number): LonLat[];
97
109
 
110
+ /**
111
+ * How the view is turned off looking straight down at the place, in degrees.
112
+ * Close to a surface only: from half a radius up the turn the map allows
113
+ * shrinks, and from one radius up the view is level.
114
+ */
115
+ export declare interface CameraAngles {
116
+ /** Off the vertical toward the horizon: 0 looks straight down. */
117
+ pitch?: number;
118
+ /** Clockwise from the north the map keeps up. */
119
+ bearing?: number;
120
+ }
121
+
98
122
  /** A suspension of the map's own camera control, for as long as it is held. */
99
123
  export declare interface CameraHold {
100
124
  /** Put the camera at `pose` from the next frame on. Call it from the map's
@@ -155,7 +179,9 @@ export declare interface CameraPose {
155
179
 
156
180
  /** The camera as it stands. `body` is what it orbits, which is also what the
157
181
  * map draws in most detail. */
158
- export declare interface CameraState {
182
+ export declare interface CameraState extends Required<CameraAngles> {
183
+ /** What `lat`, `lon` and `distanceKm` are measured from: the focused body,
184
+ * or the one a landed probe in focus stands on. */
159
185
  body: string;
160
186
  lat: number;
161
187
  lon: number;
@@ -165,7 +191,7 @@ export declare interface CameraState {
165
191
  /** Somewhere to move the camera to. What is left out is left as it is. */
166
192
  export declare interface CameraTarget extends CameraOptions {
167
193
  /** A feature on `body` to look at, rather than the body as a whole. Its
168
- * size frames the view, so `distanceKm` is not needed. */
194
+ * size frames the view: `lat`, `lon` and `distanceKm` are not read. */
169
195
  feature?: FeatureRef;
170
196
  }
171
197
 
@@ -292,6 +318,8 @@ export declare interface CoreMessages {
292
318
  attribution_imagery: () => string;
293
319
  attribution_stars: () => string;
294
320
  attribution_constellations: () => string;
321
+ attribution_galaxy: () => string;
322
+ attribution_galaxy_model: () => string;
295
323
  credits_see_all: () => string;
296
324
  layer_surface: () => string;
297
325
  layer_clouds: () => string;
@@ -316,9 +344,10 @@ export declare interface CoreMessages {
316
344
  }
317
345
 
318
346
  /**
319
- * Conditions the scene reports while it runs: the clock has left the data, or
320
- * it stopped at a probe's data wall. Raw dates and ids, never sentences — the
321
- * page around the map words them and decides how they are shown.
347
+ * Conditions the scene reports while it runs: the clock has left the data, it
348
+ * stopped at a probe's data wall, or a sphere in view wears an artist's
349
+ * impression. A notice holds raw dates and ids, not sentences. The page
350
+ * around the map words them and decides how to show them.
322
351
  */
323
352
  /** A coverage edge the clock has crossed, and where it lies. */
324
353
  export declare interface CoverageEdge {
@@ -414,6 +443,7 @@ export declare interface FeatureRef {
414
443
  /** Planetographic degrees, IAU convention. */
415
444
  lat: number;
416
445
  lon: number;
446
+ /** IAU diameter in metres; 0 when it gives none. */
417
447
  diameterM: number;
418
448
  }
419
449
 
@@ -903,7 +933,7 @@ export declare interface FocusChange {
903
933
  body: Body_2 | undefined;
904
934
  /** The first settle after boot. */
905
935
  initial: boolean;
906
- /** The camera orbits a surface feature; `body` is its host. */
936
+ /** The camera moved onto a surface feature of `body`. */
907
937
  feature: boolean;
908
938
  }
909
939
 
@@ -1032,7 +1062,7 @@ export declare function jdToDate(jd: number): Date;
1032
1062
 
1033
1063
  /** The same, for a move that does not animate: framing a body against another
1034
1064
  * one only makes sense as a placement, never as a flight. */
1035
- export declare interface JumpTarget extends CameraTarget {
1065
+ export declare interface JumpTarget extends CameraTarget, CameraAngles {
1036
1066
  /** Put this other body — the Sun, usually — behind the one being framed. */
1037
1067
  facing?: string;
1038
1068
  /** How far above the ecliptic to look from, in degrees. */
@@ -1268,7 +1298,7 @@ export declare interface Neighbours {
1268
1298
  * the same spot. */
1269
1299
  export declare function neighboursOf(entries: PanoramaEntry[], current: PanoramaEntry, radiusKm: number): Neighbours;
1270
1300
 
1271
- export declare type Notice = OutOfRangeNotice | CoveragePauseNotice;
1301
+ export declare type Notice = OutOfRangeNotice | CoveragePauseNotice | ArtistImpressionNotice;
1272
1302
 
1273
1303
  export declare type NoticeTopic = Notice['topic'];
1274
1304
 
@@ -1328,9 +1358,12 @@ export declare interface OutOfRangeNotice {
1328
1358
  } | {
1329
1359
  side: 'gap';
1330
1360
  } | null;
1331
- majorBodies: CoverageEdge | {
1332
- side: 'outside';
1333
- } | null;
1361
+ /** The edge of the ephemeris itself, once the date is past it: no planet or
1362
+ * moon has data. */
1363
+ majorBodies: CoverageEdge | null;
1364
+ /** One entry per edge crossed, by date. Bodies on the side of a crossed
1365
+ * `majorBodies` edge are left out: that edge already says why. */
1366
+ bodies: UncoveredBodies[];
1334
1367
  }
1335
1368
 
1336
1369
  /** The sky of a page. It leaves the reader's own layer settings alone. */
@@ -1414,7 +1447,14 @@ export declare interface PanoramaEntry {
1414
1447
  /** Image azimuth where the observed span begins, with its width; absent
1415
1448
  * when the archive label carried no coverage geometry. */
1416
1449
  azimuth_start_deg?: number;
1450
+ /** Width of the mosaic's frame, which can hold far less than it spans:
1451
+ * read `horizon_deg` for what the sphere shows. */
1417
1452
  hfov_deg?: number;
1453
+ /** Degrees of azimuth where the sphere's pixels hold the horizon. Zero for
1454
+ * a ring of ground. A mosaic with no real gap in its horizon reads 340 or
1455
+ * more. Tilt is taken out on most of a turn only, so a tilted arc reads
1456
+ * short. */
1457
+ horizon_deg?: number;
1418
1458
  /** Solid-angle share of the sphere the mosaic covers, percent. */
1419
1459
  sphere_percent?: number;
1420
1460
  color?: string;
@@ -1831,6 +1871,9 @@ export declare interface SceneSettings {
1831
1871
  highAmbient: boolean;
1832
1872
  realisticLighting: boolean;
1833
1873
  overexposeRings: boolean;
1874
+ /** The glow reads the grid's coarse copies where a sample is wider than a
1875
+ * cell. Debug only. */
1876
+ glowCoarseReads?: boolean;
1834
1877
  showShapeMesh: boolean;
1835
1878
  showSurfaceTexture: boolean;
1836
1879
  showDisplacement: boolean;
@@ -1953,6 +1996,10 @@ export declare class SpaceMap {
1953
1996
  /* Excluded from this release type: webglError */
1954
1997
  /* Excluded from this release type: contextLost */
1955
1998
  /* Excluded from this release type: focusedBody */
1999
+ /* Excluded from this release type: cameraBody */
2000
+ /** A move onto a surface feature is under way: the focus it hands the
2001
+ * host is that move's. */
2002
+ private movingToFeature;
1956
2003
  /* Excluded from this release type: attribution */
1957
2004
  /** Objects of the host's own: a spacecraft, a station, a body the export
1958
2005
  * has never heard of. */
@@ -1989,6 +2036,9 @@ export declare class SpaceMap {
1989
2036
  private pendingFocusId;
1990
2037
  /** The first load, started once. */
1991
2038
  private opening;
2039
+ /** The camera is on the opening view; the map shows once it stops moving. */
2040
+ private openingPlaced;
2041
+ private openingShown;
1992
2042
  /** Counts navigations: a later one supersedes an earlier one still on its way. */
1993
2043
  private navigation;
1994
2044
  /** Retires the host's hold on the camera. Kept so that a second hold, or
@@ -2006,7 +2056,8 @@ export declare class SpaceMap {
2006
2056
  /** What the map knows about an object it has loaded; undefined for one it
2007
2057
  * has not, which for a small body may simply mean not yet. */
2008
2058
  getBody(id: string): Body_2 | undefined;
2009
- /** The object the camera orbits. A surface feature reports its host body. */
2059
+ /** The object in view. For a landed probe this is the probe, and the
2060
+ * camera orbits the body it stands on. */
2010
2061
  getFocusedBody(): Body_2 | undefined;
2011
2062
  /** Ids of the objects orbiting `id` that this map has loaded. Loading is
2012
2063
  * driven by focus and by the clock, so the list grows as the reader moves. */
@@ -2045,6 +2096,8 @@ export declare class SpaceMap {
2045
2096
  /* Excluded from this release type: open */
2046
2097
  private openOnce;
2047
2098
  /* Excluded from this release type: applyInitialView */
2099
+ /* Excluded from this release type: showOpeningView */
2100
+ private revealWhenSettled;
2048
2101
  /* Excluded from this release type: mount */
2049
2102
  /** Hang a control in one of the map's corners; top-right unless the control
2050
2103
  * or the caller names another. Adding the same control twice does nothing. */
@@ -2077,9 +2130,10 @@ export declare class SpaceMap {
2077
2130
  private placedAncestor;
2078
2131
  /** The renderer, once the map draws. Null when it never will. */
2079
2132
  private rendering;
2080
- /** Turn to a feature on the body already framed, without travelling to it —
2081
- * the move a click on its label makes. Resolves when the camera comes
2082
- * round. */
2133
+ /** Turn to a feature on the body already framed, without travelling to it.
2134
+ * This is the move a click on its label makes. On another body the camera
2135
+ * flies to the feature, as {@link SpaceMap.flyTo} does. Resolves when the
2136
+ * camera comes round. */
2083
2137
  panTo(target: FeatureTarget): Promise<void>;
2084
2138
  /**
2085
2139
  * Put the camera at a place at once, with no flight. Use it to restore a
@@ -2243,7 +2297,7 @@ export declare interface SpaceMapOptions {
2243
2297
  date?: Date;
2244
2298
  live?: boolean;
2245
2299
  /** Where the map opens. */
2246
- view?: CameraOptions;
2300
+ view?: CameraOptions & CameraAngles;
2247
2301
  /** Whether the reader may move the map at all. True unless it is said
2248
2302
  * otherwise; false switches every gesture off. */
2249
2303
  interactive?: boolean;
@@ -2524,6 +2578,16 @@ export declare interface TrajectorySample {
2524
2578
  km: OffsetKm;
2525
2579
  }
2526
2580
 
2581
+ /** Planets and moons past their own kernels, which end before the ephemeris
2582
+ * does. `outside`: the date is in a hole between two of their spans. */
2583
+ export declare type UncoveredBodies = (CoverageEdge | {
2584
+ side: 'outside';
2585
+ }) & {
2586
+ ids: string[];
2587
+ /** Their names, in the order of `ids`. */
2588
+ names: string[];
2589
+ };
2590
+
2527
2591
  export declare interface VectorLayer {
2528
2592
  readonly kind: 'vector';
2529
2593
  id: string;