spacemap 0.1.20 → 0.1.22

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,7 @@ 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> {
159
183
  body: string;
160
184
  lat: number;
161
185
  lon: number;
@@ -292,6 +316,8 @@ export declare interface CoreMessages {
292
316
  attribution_imagery: () => string;
293
317
  attribution_stars: () => string;
294
318
  attribution_constellations: () => string;
319
+ attribution_galaxy: () => string;
320
+ attribution_galaxy_model: () => string;
295
321
  credits_see_all: () => string;
296
322
  layer_surface: () => string;
297
323
  layer_clouds: () => string;
@@ -316,9 +342,10 @@ export declare interface CoreMessages {
316
342
  }
317
343
 
318
344
  /**
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.
345
+ * Conditions the scene reports while it runs: the clock has left the data, it
346
+ * stopped at a probe's data wall, or a sphere in view wears an artist's
347
+ * impression. A notice holds raw dates and ids, not sentences. The page
348
+ * around the map words them and decides how to show them.
322
349
  */
323
350
  /** A coverage edge the clock has crossed, and where it lies. */
324
351
  export declare interface CoverageEdge {
@@ -414,6 +441,7 @@ export declare interface FeatureRef {
414
441
  /** Planetographic degrees, IAU convention. */
415
442
  lat: number;
416
443
  lon: number;
444
+ /** IAU diameter in metres; 0 when it gives none. */
417
445
  diameterM: number;
418
446
  }
419
447
 
@@ -1032,7 +1060,7 @@ export declare function jdToDate(jd: number): Date;
1032
1060
 
1033
1061
  /** The same, for a move that does not animate: framing a body against another
1034
1062
  * one only makes sense as a placement, never as a flight. */
1035
- export declare interface JumpTarget extends CameraTarget {
1063
+ export declare interface JumpTarget extends CameraTarget, CameraAngles {
1036
1064
  /** Put this other body — the Sun, usually — behind the one being framed. */
1037
1065
  facing?: string;
1038
1066
  /** How far above the ecliptic to look from, in degrees. */
@@ -1268,7 +1296,7 @@ export declare interface Neighbours {
1268
1296
  * the same spot. */
1269
1297
  export declare function neighboursOf(entries: PanoramaEntry[], current: PanoramaEntry, radiusKm: number): Neighbours;
1270
1298
 
1271
- export declare type Notice = OutOfRangeNotice | CoveragePauseNotice;
1299
+ export declare type Notice = OutOfRangeNotice | CoveragePauseNotice | ArtistImpressionNotice;
1272
1300
 
1273
1301
  export declare type NoticeTopic = Notice['topic'];
1274
1302
 
@@ -1328,9 +1356,12 @@ export declare interface OutOfRangeNotice {
1328
1356
  } | {
1329
1357
  side: 'gap';
1330
1358
  } | null;
1331
- majorBodies: CoverageEdge | {
1332
- side: 'outside';
1333
- } | null;
1359
+ /** The edge of the ephemeris itself, once the date is past it: no planet or
1360
+ * moon has data. */
1361
+ majorBodies: CoverageEdge | null;
1362
+ /** One entry per edge crossed, by date. Bodies on the side of a crossed
1363
+ * `majorBodies` edge are left out: that edge already says why. */
1364
+ bodies: UncoveredBodies[];
1334
1365
  }
1335
1366
 
1336
1367
  /** The sky of a page. It leaves the reader's own layer settings alone. */
@@ -1414,7 +1445,14 @@ export declare interface PanoramaEntry {
1414
1445
  /** Image azimuth where the observed span begins, with its width; absent
1415
1446
  * when the archive label carried no coverage geometry. */
1416
1447
  azimuth_start_deg?: number;
1448
+ /** Width of the mosaic's frame, which can hold far less than it spans:
1449
+ * read `horizon_deg` for what the sphere shows. */
1417
1450
  hfov_deg?: number;
1451
+ /** Degrees of azimuth where the sphere's pixels hold the horizon. Zero for
1452
+ * a ring of ground. A mosaic with no real gap in its horizon reads 340 or
1453
+ * more. Tilt is taken out on most of a turn only, so a tilted arc reads
1454
+ * short. */
1455
+ horizon_deg?: number;
1418
1456
  /** Solid-angle share of the sphere the mosaic covers, percent. */
1419
1457
  sphere_percent?: number;
1420
1458
  color?: string;
@@ -1831,6 +1869,9 @@ export declare interface SceneSettings {
1831
1869
  highAmbient: boolean;
1832
1870
  realisticLighting: boolean;
1833
1871
  overexposeRings: boolean;
1872
+ /** The glow reads the grid's coarse copies where a sample is wider than a
1873
+ * cell. Debug only. */
1874
+ glowCoarseReads?: boolean;
1834
1875
  showShapeMesh: boolean;
1835
1876
  showSurfaceTexture: boolean;
1836
1877
  showDisplacement: boolean;
@@ -1989,6 +2030,9 @@ export declare class SpaceMap {
1989
2030
  private pendingFocusId;
1990
2031
  /** The first load, started once. */
1991
2032
  private opening;
2033
+ /** The camera is on the opening view; the map shows once it stops moving. */
2034
+ private openingPlaced;
2035
+ private openingShown;
1992
2036
  /** Counts navigations: a later one supersedes an earlier one still on its way. */
1993
2037
  private navigation;
1994
2038
  /** Retires the host's hold on the camera. Kept so that a second hold, or
@@ -2017,7 +2061,8 @@ export declare class SpaceMap {
2017
2061
  /** Kilometres between two places, as the last frame drew them: a body's
2018
2062
  * centre, a point on its surface, anything an anchor names. Null while
2019
2063
  * either end is on a body this map has not loaded, or one that is nowhere
2020
- * at that date. */
2064
+ * at that date, and while a point on a surface is on a body that may yet
2065
+ * turn (see {@link getSubsolarPoint}). */
2021
2066
  distanceKm(from: Anchor, to: Anchor): number | null;
2022
2067
  /** The same measure with its direction kept: from one place to the other,
2023
2068
  * in kilometres on ecliptic J2000 axes. What a held camera's `up` is made
@@ -2026,7 +2071,10 @@ export declare class SpaceMap {
2026
2071
  /** Where on `id` the Sun is overhead, as the last frame drew it: the middle
2027
2072
  * of the lit half, in the frame a surface anchor is placed in. Null for a
2028
2073
  * body not loaded, and until the map has read how it spins, which it does
2029
- * once the camera is on the body or its system. */
2074
+ * once the camera is on the body or its system. On a bad line that can
2075
+ * take longer: a moon's spin can come before the file of the terms that
2076
+ * sway it, and the map asks for that file again until it has it, or the
2077
+ * data host says it has none. */
2030
2078
  getSubsolarPoint(id: string): LonLat | null;
2031
2079
  /** Whether this map draws surface tiles at all. False where no tile host is
2032
2080
  * set, and on a device short of memory: every body then shows its
@@ -2041,6 +2089,8 @@ export declare class SpaceMap {
2041
2089
  /* Excluded from this release type: open */
2042
2090
  private openOnce;
2043
2091
  /* Excluded from this release type: applyInitialView */
2092
+ /* Excluded from this release type: showOpeningView */
2093
+ private revealWhenSettled;
2044
2094
  /* Excluded from this release type: mount */
2045
2095
  /** Hang a control in one of the map's corners; top-right unless the control
2046
2096
  * or the caller names another. Adding the same control twice does nothing. */
@@ -2145,6 +2195,8 @@ export declare class SpaceMap {
2145
2195
  /* Excluded from this release type: snapToBodyFrom */
2146
2196
  /* Excluded from this release type: snapToBodyFacing */
2147
2197
  /* Excluded from this release type: tripView */
2198
+ /* Excluded from this release type: tripBallView */
2199
+ private vantageView;
2148
2200
  /* Excluded from this release type: focusOnFeature */
2149
2201
  /* Excluded from this release type: setFocusTarget */
2150
2202
  /** Where the camera is and what it orbits, as anchors a host can store,
@@ -2237,7 +2289,7 @@ export declare interface SpaceMapOptions {
2237
2289
  date?: Date;
2238
2290
  live?: boolean;
2239
2291
  /** Where the map opens. */
2240
- view?: CameraOptions;
2292
+ view?: CameraOptions & CameraAngles;
2241
2293
  /** Whether the reader may move the map at all. True unless it is said
2242
2294
  * otherwise; false switches every gesture off. */
2243
2295
  interactive?: boolean;
@@ -2518,6 +2570,16 @@ export declare interface TrajectorySample {
2518
2570
  km: OffsetKm;
2519
2571
  }
2520
2572
 
2573
+ /** Planets and moons past their own kernels, which end before the ephemeris
2574
+ * does. `outside`: the date is in a hole between two of their spans. */
2575
+ export declare type UncoveredBodies = (CoverageEdge | {
2576
+ side: 'outside';
2577
+ }) & {
2578
+ ids: string[];
2579
+ /** Their names, in the order of `ids`. */
2580
+ names: string[];
2581
+ };
2582
+
2521
2583
  export declare interface VectorLayer {
2522
2584
  readonly kind: 'vector';
2523
2585
  id: string;