spacemap 0.1.21 → 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/README.md +1 -1
- package/dist/spacemap.iife.js +748 -194
- package/dist/spacemap.js +749 -195
- package/index.d.ts +66 -10
- package/index.js +6248 -1376
- package/package.json +1 -1
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,
|
|
320
|
-
*
|
|
321
|
-
*
|
|
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
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
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
|
|
@@ -2045,6 +2089,8 @@ export declare class SpaceMap {
|
|
|
2045
2089
|
/* Excluded from this release type: open */
|
|
2046
2090
|
private openOnce;
|
|
2047
2091
|
/* Excluded from this release type: applyInitialView */
|
|
2092
|
+
/* Excluded from this release type: showOpeningView */
|
|
2093
|
+
private revealWhenSettled;
|
|
2048
2094
|
/* Excluded from this release type: mount */
|
|
2049
2095
|
/** Hang a control in one of the map's corners; top-right unless the control
|
|
2050
2096
|
* or the caller names another. Adding the same control twice does nothing. */
|
|
@@ -2243,7 +2289,7 @@ export declare interface SpaceMapOptions {
|
|
|
2243
2289
|
date?: Date;
|
|
2244
2290
|
live?: boolean;
|
|
2245
2291
|
/** Where the map opens. */
|
|
2246
|
-
view?: CameraOptions;
|
|
2292
|
+
view?: CameraOptions & CameraAngles;
|
|
2247
2293
|
/** Whether the reader may move the map at all. True unless it is said
|
|
2248
2294
|
* otherwise; false switches every gesture off. */
|
|
2249
2295
|
interactive?: boolean;
|
|
@@ -2524,6 +2570,16 @@ export declare interface TrajectorySample {
|
|
|
2524
2570
|
km: OffsetKm;
|
|
2525
2571
|
}
|
|
2526
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
|
+
|
|
2527
2583
|
export declare interface VectorLayer {
|
|
2528
2584
|
readonly kind: 'vector';
|
|
2529
2585
|
id: string;
|