spacemap 0.1.14 → 0.1.16
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 +33 -1
- package/dist/spacemap.iife.js +2150 -1887
- package/dist/spacemap.js +2150 -1887
- package/index.d.ts +31 -8
- package/index.js +10148 -8095
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ your page:
|
|
|
47
47
|
```html
|
|
48
48
|
<div id="map" style="height: 500px"></div>
|
|
49
49
|
<script type="module">
|
|
50
|
-
import { createMap } from 'https://cdn.jsdelivr.net/npm/spacemap@0.1.
|
|
50
|
+
import { createMap } from 'https://cdn.jsdelivr.net/npm/spacemap@0.1.16/dist/spacemap.js';
|
|
51
51
|
const map = await createMap({ container: '#map' });
|
|
52
52
|
</script>
|
|
53
53
|
```
|
|
@@ -451,6 +451,22 @@ it straight back.
|
|
|
451
451
|
The flat map needs nothing of its own for this: its pictures are layers already,
|
|
452
452
|
and `addRasterLayer` puts one of yours over or in place of them.
|
|
453
453
|
|
|
454
|
+
### Surface tiles
|
|
455
|
+
|
|
456
|
+
Close up, a body's surface sharpens with tiles fetched around the camera. Some
|
|
457
|
+
maps draw none — on a device short of memory, for one — and every body then
|
|
458
|
+
shows its whole-globe maps alone, which go soft close up:
|
|
459
|
+
|
|
460
|
+
```js
|
|
461
|
+
map.tilesEnabled(); // false where the map draws no tiles at all
|
|
462
|
+
await map.hasTiles('naif-499'); // whether tiles sharpen Mars up close
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
`hasTiles` is also false for a body without tiles, one drawn as a shape model
|
|
466
|
+
up close, and one whose tiles could not be fetched. It reads the body's own
|
|
467
|
+
data, so it answers before the camera gets there. A page can use the two to
|
|
468
|
+
limit how far the reader zooms in, or to say that close-up detail is off.
|
|
469
|
+
|
|
454
470
|
### Layers
|
|
455
471
|
|
|
456
472
|
What the map draws is a set of layers, each switched by id — the kinds of
|
|
@@ -646,6 +662,22 @@ A `system` is named by its primary and measured in the primary's radii. A body
|
|
|
646
662
|
with no moons has no system map, and asking for one rejects, leaving the map as
|
|
647
663
|
it was.
|
|
648
664
|
|
|
665
|
+
A ringed primary's rings are a band across every ring there is, out to the
|
|
666
|
+
faintest dust: Saturn's runs past Mimas, Enceladus, Tethys and Dione to the
|
|
667
|
+
E ring. `rings: 'visible'` spans only the rings `createMap` shows, at the cost
|
|
668
|
+
of the primary's bundle and its ring profiles:
|
|
669
|
+
|
|
670
|
+
```js
|
|
671
|
+
createSystemMap({
|
|
672
|
+
container: '#picker',
|
|
673
|
+
view: { kind: 'system', id: 'naif-699' },
|
|
674
|
+
rings: 'visible'
|
|
675
|
+
});
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
Jupiter's and Neptune's rings are too faint to see, so their systems then have
|
|
679
|
+
no band.
|
|
680
|
+
|
|
649
681
|
**A click reports what was picked and goes nowhere.** Walking down into a
|
|
650
682
|
system and back up is the page's own doing, which is what lets it keep a back
|
|
651
683
|
button, a breadcrumb or a URL of its own:
|