spacemap 0.1.12 → 0.1.14

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
@@ -237,14 +237,15 @@ declare interface CommonOptions {
237
237
  locale?: string;
238
238
  /** Replaces the English wording the map renders itself, one key at a time. */
239
239
  messages?: Partial<CoreMessages>;
240
- /** Draw the imagery whose licence forbids commercial reuse — off by
241
- * default, because only the page knows whether it is a commercial one.
242
- * Turning it on covers the Uranus map, which otherwise renders in its
243
- * fallback colour, and the Huygens descent panorama of Titan, which is
244
- * otherwise a place on the map with no sphere to open; the page accepts
245
- * each one's terms by asking for it, and the credit line naming its
246
- * author is a condition of them, not a courtesy. Some maps are ours for
247
- * spacemap.co alone and this does not reach them. */
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. */
248
249
  includeNonCommercial?: boolean;
249
250
  }
250
251
 
@@ -478,6 +479,8 @@ export declare class FlatMap {
478
479
  private projectionOptions;
479
480
  private view;
480
481
  private limits;
482
+ /** True when the host gave no `maxZoom`. The map then sets its own limit. */
483
+ private ownMaxZoom;
481
484
  /** The reader has moved the view since the last programmatic one, so the
482
485
  * limits apply to it. A {@link setView} lands where it was told. */
483
486
  private limitsArmed;
@@ -493,6 +496,10 @@ export declare class FlatMap {
493
496
  /** Pictures the export does not have. Remembered, or every pan would ask
494
497
  * for them again and report the same failure. */
495
498
  private readonly missing;
499
+ /** The tile windows of each picture layer that has a pyramid. */
500
+ private readonly tiles;
501
+ /** `performance.now()` of the last tile plan. */
502
+ private plannedAt;
496
503
  /** Bumped whenever the map moves to another body, so work started for the
497
504
  * one being left can tell that it is no longer wanted. */
498
505
  private generation;
@@ -598,13 +605,15 @@ export declare class FlatMap {
598
605
  setView(view: Partial<FlatViewState>): void;
599
606
  /**
600
607
  * Replace the reader's limits, whole. What the new set leaves out is
601
- * unrestricted again, except `maxZoom`, which goes back to 16.
608
+ * unrestricted again, except `maxZoom`, which goes back to the map's own:
609
+ * 16, or more where the surface has tiles.
602
610
  *
603
611
  * Limits gate reader input only: {@link setView} lands where it was told,
604
612
  * and the reader's next gesture brings the view back inside.
605
613
  */
606
614
  setLimits(limits: FlatMapLimits): this;
607
- /** The limits as they stand. */
615
+ /** The limits as they stand. Where the host gave no `maxZoom`, it is the
616
+ * map's own for the place in the middle of the frame. */
608
617
  getLimits(): FlatMapLimits;
609
618
  /** The moment the map is of. Moves the clouds and, on Earth, the season. */
610
619
  setTime(jd: number): void;
@@ -660,6 +669,33 @@ export declare class FlatMap {
660
669
  private rasterFor;
661
670
  /** Release every claim this map holds on the shared pictures. */
662
671
  private dropTextures;
672
+ /** The tiles of a layer, where this host draws them and the pyramid holds
673
+ * more than the picture under it. */
674
+ private tilesOf;
675
+ /** The first level that holds more than the picture under the tiles. An
676
+ * equirectangular map draws that picture whole, and the others sample a
677
+ * copy of a limited width. */
678
+ private firstTileLevel;
679
+ /** What the tile plan reads of a frame. `density` is the number of drawn
680
+ * pixels for each pixel of `viewport`. Undefined when the middle of the
681
+ * frame is off the world. */
682
+ private frameSample;
683
+ /** Ask for the tile windows of the frame, layer by layer. */
684
+ private planTiles;
685
+ /** Whether the reader can move the map. */
686
+ private moves;
687
+ private dropTiles;
688
+ /**
689
+ * How far in the reader can go when the host gives no limit. Where tiles
690
+ * serve, it is the zoom that draws the finest tiles under the middle of the
691
+ * frame at `MAX_TILE_STRETCH`.
692
+ */
693
+ private pictureMaxZoom;
694
+ /** The limits that hold the view. Where tiles serve, the map's own zoom
695
+ * limit changes from place to place. It then only stops the way in, and
696
+ * does not pull back a view that is past it. */
697
+ private heldLimits;
698
+ /* Excluded from this release type: tileStepDeg */
663
699
  private viewport;
664
700
  /** Draw on the next frame. Repeated calls in one frame draw once. */
665
701
  render(): void;
@@ -735,6 +771,7 @@ export declare type FlatMapGesture = 'dragPan' | 'scrollZoom';
735
771
  export declare interface FlatMapLimits {
736
772
  /** 1 is the whole world; the reader may not go under it either way. */
737
773
  minZoom?: number;
774
+ /** Left out, the map sets its own: 16, or more where the surface has tiles. */
738
775
  maxZoom?: number;
739
776
  /** The band of the surface the middle of the frame may sit in. A longitude
740
777
  * band may run through the antimeridian: 170 to −170 is the twenty degrees
@@ -907,11 +944,12 @@ export declare interface Host {
907
944
  messages: CoreMessages;
908
945
  /** Link target of a body's scene label. */
909
946
  bodyHref: (id: string, name: string) => string;
910
- /** How far down the `distribution` ladder this embed may draw surface maps
911
- * (docs/export-format/textures.md). `open` is the maps anyone may serve,
912
- * `non-commercial` adds those whose licence bars commercial reuse, and
913
- * `site-only` adds those cleared for spacemap.co alone. A bare embed gets
914
- * `open`: it cannot accept a licence for the page it sits on. */
947
+ /** How far down the `distribution` ladder this embed may draw surface maps,
948
+ * panoramas and craft models (docs/export-format/textures.md). `open` is
949
+ * what anyone may serve, `non-commercial` adds works whose licence bars
950
+ * commercial reuse, and `site-only` adds those cleared for spacemap.co
951
+ * alone. A bare embed gets `open`: it cannot accept a licence for the page
952
+ * it sits on. */
915
953
  textures: TextureDistribution;
916
954
  }
917
955
 
@@ -972,8 +1010,8 @@ export declare type Interpolation =
972
1010
  * track means by a straight line. */
973
1011
  | 'geodesic';
974
1012
 
975
- /** Whether a stop has a sphere to open, as against a place on the traverse:
976
- * one exists, and this host's terms reach it. */
1013
+ /** True when the terms of this host allow the sphere of the stop, so the view
1014
+ * can open it. */
977
1015
  export declare function isViewable(entry: PanoramaEntry): boolean;
978
1016
 
979
1017
  /** Convert a Julian Date to a JS Date. */
@@ -1317,9 +1355,8 @@ export declare interface PanoramaEntry {
1317
1355
  altitude_m?: number;
1318
1356
  title?: string;
1319
1357
  /** Image azimuth of true north, degrees clockwise from the left edge.
1320
- * Zero, and meaningless, where `orientation` is `unknown`; absent with
1321
- * the rest of the sphere's geometry where the imagery is withheld. */
1322
- north_offset_deg?: number;
1358
+ * Zero, and meaningless, where `orientation` is `unknown`. */
1359
+ north_offset_deg: number;
1323
1360
  /** How north was established, absent where the archive itself states it.
1324
1361
  * `unknown` means the sphere sits at an arbitrary azimuth, so nothing
1325
1362
  * may be drawn or written as a heading. The full set `export/panoramas.py`
@@ -1342,9 +1379,6 @@ export declare interface PanoramaEntry {
1342
1379
  credit?: string;
1343
1380
  credit_url?: string;
1344
1381
  source_url?: string;
1345
- /** `withheld` where the release's reuse terms are unsettled: the stop is
1346
- * published as a place and a date, and no texture exists to fetch. */
1347
- imagery?: 'withheld';
1348
1382
  /** How far down the host's texture ladder this sphere may be drawn; absent
1349
1383
  * where its terms allow any use. */
1350
1384
  distribution?: TextureDistribution;
@@ -1359,9 +1393,6 @@ export declare interface PanoramaMissionSummary {
1359
1393
  count: number;
1360
1394
  first_time: string;
1361
1395
  last_time: string;
1362
- /** False where no stop on the traverse publishes a sphere: the places are
1363
- * on the map, and there is nothing to open. */
1364
- imagery?: boolean;
1365
1396
  }
1366
1397
 
1367
1398
  export declare class PanoramaView {
@@ -2360,8 +2391,9 @@ export declare type SystemMapView = {
2360
2391
  /** Small bodies inside Jupiter's orbit, or from it outward. */
2361
2392
  export declare type SystemMapZone = 'inner' | 'outer';
2362
2393
 
2363
- /** Who may serve a surface map, widest first. A body whose map this embed may
2364
- * not draw renders in its fallback colour, as an untextured body does. */
2394
+ /** Who may serve a work, widest first. A body whose map this embed may not
2395
+ * draw renders in its fallback colour, as an untextured body does; a craft
2396
+ * whose model it may not draw stays a marker. */
2365
2397
  declare type TextureDistribution = 'open' | 'non-commercial' | 'site-only';
2366
2398
 
2367
2399
  /**