spacemap 0.1.18 → 0.1.19
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 +223 -152
- package/dist/spacemap.js +223 -152
- package/index.d.ts +22 -6
- package/index.js +2585 -182
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -233,6 +233,9 @@ declare interface CommonOptions {
|
|
|
233
233
|
* production CDN serves none: without it a body draws its whole-globe
|
|
234
234
|
* maps alone. */
|
|
235
235
|
tilesUrl?: string;
|
|
236
|
+
/** Root of the extrasolar export, for a mirror that serves it. Without it
|
|
237
|
+
* the map has no stars. */
|
|
238
|
+
extrasolarUrl?: string;
|
|
236
239
|
/** BCP-47 tag that picks localized names; English when omitted. */
|
|
237
240
|
locale?: string;
|
|
238
241
|
/** Replaces the English wording the map renders itself, one key at a time. */
|
|
@@ -242,8 +245,8 @@ declare interface CommonOptions {
|
|
|
242
245
|
* one. Turning it on covers the Uranus map, which otherwise renders in
|
|
243
246
|
* its fallback colour, the Huygens descent panorama of Titan, which is
|
|
244
247
|
* otherwise a place on the map with no sphere to open, and the models of
|
|
245
|
-
* a few craft (Buran, Vostok, Lunokhod), which otherwise stay markers
|
|
246
|
-
* the page accepts each one's terms by asking for it, and the credit line
|
|
248
|
+
* a few craft (Buran, Vostok, Lunokhod), which otherwise stay markers, and
|
|
249
|
+
* the stars from Gaia, which otherwise stay off the map; the page accepts each one's terms by asking for it, and the credit line
|
|
247
250
|
* naming its author is a condition of them, not a courtesy. Some maps are
|
|
248
251
|
* ours for spacemap.co alone and this does not reach them. */
|
|
249
252
|
includeNonCommercial?: boolean;
|
|
@@ -287,6 +290,7 @@ export declare interface CoreMessages {
|
|
|
287
290
|
scene_canvas_label: () => string;
|
|
288
291
|
attribution_orbits: () => string;
|
|
289
292
|
attribution_imagery: () => string;
|
|
293
|
+
attribution_stars: () => string;
|
|
290
294
|
credits_see_all: () => string;
|
|
291
295
|
layer_surface: () => string;
|
|
292
296
|
layer_clouds: () => string;
|
|
@@ -619,7 +623,7 @@ export declare class FlatMap {
|
|
|
619
623
|
/** The moment the map is of. Moves the clouds and, on Earth, the season. */
|
|
620
624
|
setTime(jd: number): void;
|
|
621
625
|
setBody(bodyId: string): Promise<void>;
|
|
622
|
-
/** Screen pixel for
|
|
626
|
+
/** Screen pixel for the visible copy of a place. */
|
|
623
627
|
project(lon: number, lat: number): [number, number] | null;
|
|
624
628
|
/** The place under a pixel of the map's box, or null off the world. */
|
|
625
629
|
unproject(px: number, py: number): LonLat | null;
|
|
@@ -940,13 +944,17 @@ export declare interface Host {
|
|
|
940
944
|
* data export's host. Empty where none is served: bodies then draw their
|
|
941
945
|
* whole-globe tiers alone. */
|
|
942
946
|
tilesUrl: string;
|
|
947
|
+
/** Root of the extrasolar export, which holds the star render nodes and
|
|
948
|
+
* the record tiles. Empty where none is served, and the map then has no
|
|
949
|
+
* stars. */
|
|
950
|
+
extrasolarUrl: string;
|
|
943
951
|
/** BCP-47 tag of the reading language: picks localized names and drives Intl. */
|
|
944
952
|
locale: () => string;
|
|
945
953
|
messages: CoreMessages;
|
|
946
954
|
/** Link target of a body's scene label. */
|
|
947
955
|
bodyHref: (id: string, name: string) => string;
|
|
948
956
|
/** How far down the `distribution` ladder this embed may draw surface maps,
|
|
949
|
-
* panoramas
|
|
957
|
+
* panoramas, craft models and stars (docs/export-format/textures.md). `open` is
|
|
950
958
|
* what anyone may serve, `non-commercial` adds works whose licence bars
|
|
951
959
|
* commercial reuse, and `site-only` adds those cleared for spacemap.co
|
|
952
960
|
* alone. A bare embed gets `open`: it cannot accept a licence for the page
|
|
@@ -1085,7 +1093,7 @@ export declare interface LonLat {
|
|
|
1085
1093
|
|
|
1086
1094
|
/** Every layer, in the order a switcher should offer them: the objects first,
|
|
1087
1095
|
* then the chrome drawn around them. */
|
|
1088
|
-
export declare const MAP_LAYERS: readonly ["planets", "dwarfPlanets", "moons", "asteroids", "comets", "spacecraft", "satellites", "debris", "orbits", "labels", "halos", "nomenclature", "stars"];
|
|
1096
|
+
export declare const MAP_LAYERS: readonly ["planets", "dwarfPlanets", "moons", "asteroids", "comets", "spacecraft", "satellites", "debris", "starfield", "orbits", "labels", "halos", "nomenclature", "stars"];
|
|
1089
1097
|
|
|
1090
1098
|
export declare interface MapEvents {
|
|
1091
1099
|
focuschange: (e: FocusChange) => void;
|
|
@@ -1928,9 +1936,13 @@ export declare class SpaceMap {
|
|
|
1928
1936
|
private canvas;
|
|
1929
1937
|
private labelLayer;
|
|
1930
1938
|
private stopWatching;
|
|
1939
|
+
private stopExtrasolarStale;
|
|
1931
1940
|
private controls;
|
|
1932
1941
|
private lostPanelTimer;
|
|
1933
1942
|
private cooperative;
|
|
1943
|
+
/** Whether a click on a star takes the focus. A host's map has no page to
|
|
1944
|
+
* open for a star, so it is off unless the app turns it on. */
|
|
1945
|
+
private starSelectEnabled;
|
|
1934
1946
|
private limits;
|
|
1935
1947
|
private initialFocusPending;
|
|
1936
1948
|
private pendingFocusId;
|
|
@@ -2066,6 +2078,7 @@ export declare class SpaceMap {
|
|
|
2066
2078
|
getLimits(): CameraLimits;
|
|
2067
2079
|
private applyLimits;
|
|
2068
2080
|
private applyGestures;
|
|
2081
|
+
/* Excluded from this release type: setStarSelectEnabled */
|
|
2069
2082
|
/** A wheel the page is to keep never reaches the orbit controls. It is not
|
|
2070
2083
|
* cancelled, so the page scrolls as it would over any other element. */
|
|
2071
2084
|
private readonly onWheelCapture;
|
|
@@ -2086,6 +2099,7 @@ export declare class SpaceMap {
|
|
|
2086
2099
|
private cameraDistance;
|
|
2087
2100
|
/* Excluded from this release type: focusOnBody */
|
|
2088
2101
|
/* Excluded from this release type: snapToBody */
|
|
2102
|
+
/* Excluded from this release type: snapToBodyFrom */
|
|
2089
2103
|
/* Excluded from this release type: snapToBodyFacing */
|
|
2090
2104
|
/* Excluded from this release type: focusOnFeature */
|
|
2091
2105
|
/* Excluded from this release type: setFocusTarget */
|
|
@@ -2487,7 +2501,7 @@ export declare class Viewport {
|
|
|
2487
2501
|
fromScreen(px: number, py: number): [number, number];
|
|
2488
2502
|
/** Screen pixel for a place, or null where it is not on the map. */
|
|
2489
2503
|
project(lon: number, lat: number): [number, number] | null;
|
|
2490
|
-
/** Place under a screen pixel,
|
|
2504
|
+
/** Place under a screen pixel, including repeated copies of the world. */
|
|
2491
2505
|
unproject(px: number, py: number): [number, number] | null;
|
|
2492
2506
|
/** How wide the whole world is in pixels — the jump that tells a drawn line
|
|
2493
2507
|
* it has crossed the seam rather than moved. */
|
|
@@ -2498,6 +2512,8 @@ export declare class Viewport {
|
|
|
2498
2512
|
* the map's own always first. Anything drawn on the map is drawn once per
|
|
2499
2513
|
* offset, so a shape near the seam shows on both sides of it. */
|
|
2500
2514
|
get repeatShifts(): number[];
|
|
2515
|
+
/** Offset that places this world position in the frame. */
|
|
2516
|
+
shiftInFrame(x: number): number;
|
|
2501
2517
|
}
|
|
2502
2518
|
|
|
2503
2519
|
export declare interface ViewState {
|