spacemap 0.1.11 → 0.1.13
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 +32 -9
- package/dist/spacemap.iife.js +167 -105
- package/dist/spacemap.js +167 -105
- package/index.d.ts +37 -15
- package/index.js +603 -274
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -227,18 +227,25 @@ declare interface CommonOptions {
|
|
|
227
227
|
* origin does not serve pictures; a mirror that serves both sets this to
|
|
228
228
|
* the same place as `dataUrl`. */
|
|
229
229
|
imagesUrl?: string;
|
|
230
|
+
/** Root of the live tracking feed, for a mirror that writes its own. */
|
|
231
|
+
liveUrl?: string;
|
|
232
|
+
/** Root of the surface tile pyramids, for a mirror that serves them. The
|
|
233
|
+
* production CDN serves none: without it a body draws its whole-globe
|
|
234
|
+
* maps alone. */
|
|
235
|
+
tilesUrl?: string;
|
|
230
236
|
/** BCP-47 tag that picks localized names; English when omitted. */
|
|
231
237
|
locale?: string;
|
|
232
238
|
/** Replaces the English wording the map renders itself, one key at a time. */
|
|
233
239
|
messages?: Partial<CoreMessages>;
|
|
234
|
-
/** Draw the imagery whose licence forbids commercial reuse —
|
|
235
|
-
* default, because only the page knows whether it is a commercial
|
|
236
|
-
* Turning it on covers the Uranus map, which otherwise renders in
|
|
237
|
-
* fallback colour,
|
|
238
|
-
* otherwise a place on the map with no sphere to open
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
240
|
+
/** Draw the imagery and models whose licence forbids commercial reuse —
|
|
241
|
+
* off by default, because only the page knows whether it is a commercial
|
|
242
|
+
* one. Turning it on covers the Uranus map, which otherwise renders in
|
|
243
|
+
* its fallback colour, the Huygens descent panorama of Titan, which is
|
|
244
|
+
* 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
|
|
247
|
+
* naming its author is a condition of them, not a courtesy. Some maps are
|
|
248
|
+
* ours for spacemap.co alone and this does not reach them. */
|
|
242
249
|
includeNonCommercial?: boolean;
|
|
243
250
|
}
|
|
244
251
|
|
|
@@ -901,11 +908,12 @@ export declare interface Host {
|
|
|
901
908
|
messages: CoreMessages;
|
|
902
909
|
/** Link target of a body's scene label. */
|
|
903
910
|
bodyHref: (id: string, name: string) => string;
|
|
904
|
-
/** How far down the `distribution` ladder this embed may draw surface maps
|
|
905
|
-
* (docs/export-format/textures.md). `open` is
|
|
906
|
-
* `non-commercial` adds
|
|
907
|
-
* `site-only` adds those cleared for spacemap.co
|
|
908
|
-
* `open`: it cannot accept a licence for the page
|
|
911
|
+
/** How far down the `distribution` ladder this embed may draw surface maps,
|
|
912
|
+
* panoramas and craft models (docs/export-format/textures.md). `open` is
|
|
913
|
+
* what anyone may serve, `non-commercial` adds works whose licence bars
|
|
914
|
+
* commercial reuse, and `site-only` adds those cleared for spacemap.co
|
|
915
|
+
* alone. A bare embed gets `open`: it cannot accept a licence for the page
|
|
916
|
+
* it sits on. */
|
|
909
917
|
textures: TextureDistribution;
|
|
910
918
|
}
|
|
911
919
|
|
|
@@ -2133,6 +2141,19 @@ export declare interface SpaceMapOptions {
|
|
|
2133
2141
|
*/
|
|
2134
2142
|
export declare function subsolarPoint(id: string, date: Date): Promise<LonLat | null>;
|
|
2135
2143
|
|
|
2144
|
+
/**
|
|
2145
|
+
* The part of the light of the Sun that reaches `id` at `date`, from 0 to 1.
|
|
2146
|
+
* It is 1 in full sunlight and 0 when all of the body is in the shadow of
|
|
2147
|
+
* another. Between the two, a part of its sunlit face is in shadow.
|
|
2148
|
+
*
|
|
2149
|
+
* Only the bodies of its own system can be in the way. These are the body it
|
|
2150
|
+
* orbits, and the planet and the moons that orbit the same body. Each is a
|
|
2151
|
+
* ball of the radius the map draws it with. The value is a mean over 1024
|
|
2152
|
+
* points of the sunlit face. Null and rejection are those of
|
|
2153
|
+
* {@link subsolarPoint}.
|
|
2154
|
+
*/
|
|
2155
|
+
export declare function sunlight(id: string, date: Date): Promise<number | null>;
|
|
2156
|
+
|
|
2136
2157
|
/** A place on (or above) the body's surface, turning with it. */
|
|
2137
2158
|
export declare interface SurfaceAnchor {
|
|
2138
2159
|
body: string;
|
|
@@ -2341,8 +2362,9 @@ export declare type SystemMapView = {
|
|
|
2341
2362
|
/** Small bodies inside Jupiter's orbit, or from it outward. */
|
|
2342
2363
|
export declare type SystemMapZone = 'inner' | 'outer';
|
|
2343
2364
|
|
|
2344
|
-
/** Who may serve a
|
|
2345
|
-
*
|
|
2365
|
+
/** Who may serve a work, widest first. A body whose map this embed may not
|
|
2366
|
+
* draw renders in its fallback colour, as an untextured body does; a craft
|
|
2367
|
+
* whose model it may not draw stays a marker. */
|
|
2346
2368
|
declare type TextureDistribution = 'open' | 'non-commercial' | 'site-only';
|
|
2347
2369
|
|
|
2348
2370
|
/**
|