globe.gl 2.24.1 → 2.24.5
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 +19 -22
- package/dist/globe.gl.d.ts +20 -20
- package/dist/globe.gl.js +4384 -4225
- package/dist/globe.gl.js.map +1 -1
- package/dist/globe.gl.min.js +4 -4
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -3,8 +3,7 @@ Globe.GL
|
|
|
3
3
|
|
|
4
4
|
[![NPM package][npm-img]][npm-url]
|
|
5
5
|
[![Build Size][build-size-img]][build-size-url]
|
|
6
|
-
[![
|
|
7
|
-
[![jsdelivr][jsdelivr-img]][jsdelivr-url]
|
|
6
|
+
[![NPM Downloads][npm-downloads-img]][npm-downloads-url]
|
|
8
7
|
|
|
9
8
|
<p align="center">
|
|
10
9
|
<a href="//vasturiano.github.io/globe.gl/example/world-population/"><img width="48%" src="https://vasturiano.github.io/globe.gl/example/world-population/preview.png"></a>
|
|
@@ -18,7 +17,12 @@ Globe.GL
|
|
|
18
17
|
A web component to represent data visualization layers on a 3-dimensional globe in a spherical projection.
|
|
19
18
|
This library is a convenience wrapper around the [three-globe](https://github.com/vasturiano/three-globe) plugin, and uses [ThreeJS](https://github.com/mrdoob/three.js/)/WebGL for 3D rendering.
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
See also the [AR version](https://github.com/vasturiano/globe-ar).
|
|
21
|
+
|
|
22
|
+
And check out the [React bindings](https://github.com/vasturiano/react-globe.gl).
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
22
26
|
* [Basic](https://vasturiano.github.io/globe.gl/example/basic/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/basic/index.html))
|
|
23
27
|
* [Arc Links](https://vasturiano.github.io/globe.gl/example/random-arcs/) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/random-arcs/index.html))
|
|
24
28
|
* [Highlight links](https://vasturiano.github.io/globe.gl/example/airline-routes/highlight-links.html) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/airline-routes/highlight-links.html))
|
|
@@ -43,37 +47,32 @@ Check out the examples:
|
|
|
43
47
|
* [Submarine Cables](https://vasturiano.github.io/globe.gl/example/submarine-cables/index.html) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/submarine-cables/index.html))
|
|
44
48
|
* [Moon Landing Sites](https://vasturiano.github.io/globe.gl/example/moon-landing-sites/index.html) ([source](https://github.com/vasturiano/globe.gl/blob/master/example/moon-landing-sites/index.html))
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
See also the [AR version](https://github.com/vasturiano/globe-ar).
|
|
48
|
-
|
|
49
|
-
And check out the [React bindings](https://github.com/vasturiano/react-globe.gl).
|
|
50
|
-
|
|
51
50
|
## Quick start
|
|
52
51
|
|
|
53
|
-
```
|
|
52
|
+
```js
|
|
54
53
|
import Globe from 'globe.gl';
|
|
55
54
|
```
|
|
56
55
|
or
|
|
57
|
-
```
|
|
56
|
+
```js
|
|
58
57
|
const Globe = require('globe.gl');
|
|
59
58
|
```
|
|
60
59
|
or even
|
|
61
|
-
```
|
|
60
|
+
```html
|
|
62
61
|
<script src="//unpkg.com/globe.gl"></script>
|
|
63
62
|
```
|
|
64
63
|
then
|
|
65
|
-
```
|
|
64
|
+
```js
|
|
66
65
|
const myGlobe = Globe();
|
|
67
|
-
myGlobe(
|
|
68
|
-
.globeImageUrl(
|
|
69
|
-
.pointsData(
|
|
66
|
+
myGlobe(myDOMElement)
|
|
67
|
+
.globeImageUrl(myImageUrl)
|
|
68
|
+
.pointsData(myData);
|
|
70
69
|
```
|
|
71
70
|
|
|
72
71
|
## API reference
|
|
73
72
|
|
|
74
73
|
### Initialisation
|
|
75
74
|
|
|
76
|
-
```
|
|
75
|
+
```js
|
|
77
76
|
Globe({ configOptions })(<domElement>)
|
|
78
77
|
```
|
|
79
78
|
|
|
@@ -368,11 +367,9 @@ Globe({ configOptions })(<domElement>)
|
|
|
368
367
|
|
|
369
368
|
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=L398E7PKP47E8¤cy_code=USD&source=url) If this project has helped you and you'd like to contribute back, you can always [buy me a ☕](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=L398E7PKP47E8¤cy_code=USD&source=url)!
|
|
370
369
|
|
|
371
|
-
[npm-img]: https://img.shields.io/npm/v/globe.gl
|
|
370
|
+
[npm-img]: https://img.shields.io/npm/v/globe.gl
|
|
372
371
|
[npm-url]: https://npmjs.org/package/globe.gl
|
|
373
|
-
[build-size-img]: https://img.shields.io/bundlephobia/minzip/globe.gl
|
|
372
|
+
[build-size-img]: https://img.shields.io/bundlephobia/minzip/globe.gl
|
|
374
373
|
[build-size-url]: https://bundlephobia.com/result?p=globe.gl
|
|
375
|
-
[
|
|
376
|
-
[
|
|
377
|
-
[jsdelivr-img]: https://data.jsdelivr.com/v1/package/npm/globe.gl/badge?style=rounded
|
|
378
|
-
[jsdelivr-url]: https://www.jsdelivr.com/package/npm/globe.gl
|
|
374
|
+
[npm-downloads-img]: https://img.shields.io/npm/dt/globe.gl
|
|
375
|
+
[npm-downloads-url]: https://www.npmtrends.com/globe.gl
|
package/dist/globe.gl.d.ts
CHANGED
|
@@ -57,34 +57,34 @@ interface GlobeGenericInstance<ChainableInstance> extends ThreeGlobeGeneric<Chai
|
|
|
57
57
|
customLayerLabel(textAccessor: ObjAccessor<string>): ChainableInstance;
|
|
58
58
|
|
|
59
59
|
// Interaction events
|
|
60
|
-
onGlobeClick(callback: (coords: { lat, lng }, event: MouseEvent) => void): ChainableInstance;
|
|
61
|
-
onGlobeRightClick(callback: (coords: { lat, lng }, event: MouseEvent) => void): ChainableInstance;
|
|
62
|
-
onPointClick(callback: (point: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
63
|
-
onPointRightClick(callback: (point: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
60
|
+
onGlobeClick(callback: (coords: { lat: number, lng: number }, event: MouseEvent) => void): ChainableInstance;
|
|
61
|
+
onGlobeRightClick(callback: (coords: { lat: number, lng: number }, event: MouseEvent) => void): ChainableInstance;
|
|
62
|
+
onPointClick(callback: (point: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
63
|
+
onPointRightClick(callback: (point: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
64
64
|
onPointHover(callback: (point: object | null, prevPoint: object | null) => void): ChainableInstance;
|
|
65
|
-
onArcClick(callback: (arc: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
66
|
-
onArcRightClick(callback: (arc: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
65
|
+
onArcClick(callback: (arc: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
66
|
+
onArcRightClick(callback: (arc: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
67
67
|
onArcHover(callback: (arc: object | null, prevArc: object | null) => void): ChainableInstance;
|
|
68
|
-
onPolygonClick(callback: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
69
|
-
onPolygonRightClick(callback: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
68
|
+
onPolygonClick(callback: (polygon: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
69
|
+
onPolygonRightClick(callback: (polygon: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
70
70
|
onPolygonHover(callback: (polygon: object | null, prevPolygon: object | null) => void): ChainableInstance;
|
|
71
|
-
onPathClick(callback: (path: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
72
|
-
onPathRightClick(callback: (path: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
71
|
+
onPathClick(callback: (path: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
72
|
+
onPathRightClick(callback: (path: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
73
73
|
onPathHover(callback: (path: object | null, prevPath: object | null) => void): ChainableInstance;
|
|
74
|
-
onHexClick(callback: (hex: HexBin, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
75
|
-
onHexRightClick(callback: (hex: HexBin, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
74
|
+
onHexClick(callback: (hex: HexBin, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
75
|
+
onHexRightClick(callback: (hex: HexBin, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
76
76
|
onHexHover(callback: (hex: HexBin | null, prevHex: HexBin | null) => void): ChainableInstance;
|
|
77
|
-
onHexPolygonClick(callback: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
78
|
-
onHexPolygonRightClick(callback: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
77
|
+
onHexPolygonClick(callback: (polygon: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
78
|
+
onHexPolygonRightClick(callback: (polygon: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
79
79
|
onHexPolygonHover(callback: (polygon: object | null, prevPolygon: object | null) => void): ChainableInstance;
|
|
80
|
-
onTileClick(callback: (tile: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
81
|
-
onTileRightClick(callback: (tile: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
80
|
+
onTileClick(callback: (tile: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
81
|
+
onTileRightClick(callback: (tile: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
82
82
|
onTileHover(callback: (tile: object | null, prevTile: object | null) => void): ChainableInstance;
|
|
83
|
-
onLabelClick(callback: (label: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
84
|
-
onLabelRightClick(callback: (label: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
83
|
+
onLabelClick(callback: (label: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
84
|
+
onLabelRightClick(callback: (label: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
85
85
|
onLabelHover(callback: (label: object | null, prevLabel: object | null) => void): ChainableInstance;
|
|
86
|
-
onCustomLayerClick(callback: (obj: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
87
|
-
onCustomLayerRightClick(callback: (obj: object, event: MouseEvent, coords: { lat, lng, altitude }) => void): ChainableInstance;
|
|
86
|
+
onCustomLayerClick(callback: (obj: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
87
|
+
onCustomLayerRightClick(callback: (obj: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void): ChainableInstance;
|
|
88
88
|
onCustomLayerHover(callback: (obj: object | null, prevObj: object | null) => void): ChainableInstance;
|
|
89
89
|
|
|
90
90
|
// Render control
|