react-globe.gl 2.20.0 → 2.20.4
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 +9 -8
- package/dist/react-globe.gl.d.ts +20 -20
- package/dist/react-globe.gl.js +11899 -13212
- package/dist/react-globe.gl.js.map +1 -1
- package/dist/react-globe.gl.min.js +4 -4
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ react-globe.gl
|
|
|
3
3
|
|
|
4
4
|
[![NPM package][npm-img]][npm-url]
|
|
5
5
|
[![Build Size][build-size-img]][build-size-url]
|
|
6
|
-
[![
|
|
6
|
+
[![NPM Downloads][npm-downloads-img]][npm-downloads-url]
|
|
7
7
|
|
|
8
8
|
React bindings for the [globe.gl](https://github.com/vasturiano/globe.gl) UI component.
|
|
9
9
|
|
|
@@ -31,6 +31,7 @@ Check out the examples:
|
|
|
31
31
|
* [Tiles](https://vasturiano.github.io/react-globe.gl/example/tiles/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/tiles/index.html))
|
|
32
32
|
* [Ripple Rings](https://vasturiano.github.io/react-globe.gl/example/random-rings/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/random-rings/index.html))
|
|
33
33
|
* [Emit Arcs on Click](https://vasturiano.github.io/react-globe.gl/example/emit-arcs-on-click/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/emit-arcs-on-click/index.html))
|
|
34
|
+
* [Clouds](https://vasturiano.github.io/react-globe.gl/example/clouds/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/clouds/index.html))
|
|
34
35
|
* [Solar Terminator](https://vasturiano.github.io/react-globe.gl/example/solar-terminator/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/solar-terminator/index.html))
|
|
35
36
|
* [Custom Globe Styling](https://vasturiano.github.io/react-globe.gl/example/custom-globe-styling/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/custom-globe-styling/index.html))
|
|
36
37
|
* [Custom Layer](https://vasturiano.github.io/react-globe.gl/example/custom-layer/) ([source](https://github.com/vasturiano/react-globe.gl/blob/master/example/custom-layer/index.html))
|
|
@@ -45,19 +46,19 @@ Check out the examples:
|
|
|
45
46
|
|
|
46
47
|
## Quick start
|
|
47
48
|
|
|
48
|
-
```
|
|
49
|
+
```js
|
|
49
50
|
import Globe from 'react-globe.gl';
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
or using a script tag
|
|
53
54
|
|
|
54
|
-
```
|
|
55
|
+
```html
|
|
55
56
|
<script src="//unpkg.com/react-globe.gl"></script>
|
|
56
57
|
```
|
|
57
58
|
|
|
58
59
|
then
|
|
59
60
|
|
|
60
|
-
```
|
|
61
|
+
```jsx
|
|
61
62
|
ReactDOM.render(
|
|
62
63
|
<Globe
|
|
63
64
|
pointsData={myData}
|
|
@@ -359,9 +360,9 @@ ReactDOM.render(
|
|
|
359
360
|
|
|
360
361
|
[](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)!
|
|
361
362
|
|
|
362
|
-
[npm-img]: https://img.shields.io/npm/v/react-globe.gl
|
|
363
|
+
[npm-img]: https://img.shields.io/npm/v/react-globe.gl
|
|
363
364
|
[npm-url]: https://npmjs.org/package/react-globe.gl
|
|
364
|
-
[build-size-img]: https://img.shields.io/bundlephobia/minzip/react-globe.gl
|
|
365
|
+
[build-size-img]: https://img.shields.io/bundlephobia/minzip/react-globe.gl
|
|
365
366
|
[build-size-url]: https://bundlephobia.com/result?p=react-globe.gl
|
|
366
|
-
[
|
|
367
|
-
[
|
|
367
|
+
[npm-downloads-img]: https://img.shields.io/npm/dt/react-globe.gl
|
|
368
|
+
[npm-downloads-url]: https://www.npmtrends.com/react-globe.gl
|
package/dist/react-globe.gl.d.ts
CHANGED
|
@@ -56,8 +56,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
56
56
|
atmosphereAltitude?: number;
|
|
57
57
|
globeMaterial?: Material;
|
|
58
58
|
onGlobeReady?: () => void;
|
|
59
|
-
onGlobeClick?: (coords: { lat, lng }, event: MouseEvent) => void;
|
|
60
|
-
onGlobeRightClick?: (coords: { lat, lng }, event: MouseEvent) => void;
|
|
59
|
+
onGlobeClick?: (coords: { lat: number, lng: number }, event: MouseEvent) => void;
|
|
60
|
+
onGlobeRightClick?: (coords: { lat: number, lng: number }, event: MouseEvent) => void;
|
|
61
61
|
|
|
62
62
|
// Points layer
|
|
63
63
|
pointsData?: object[];
|
|
@@ -70,8 +70,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
70
70
|
pointsMerge?: boolean;
|
|
71
71
|
pointsTransitionDuration?: number;
|
|
72
72
|
pointLabel?: ObjAccessor<string>;
|
|
73
|
-
onPointClick?: (point: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
74
|
-
onPointRightClick?: (point: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
73
|
+
onPointClick?: (point: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
74
|
+
onPointRightClick?: (point: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
75
75
|
onPointHover?: (point: object | null, prevPoint: object | null) => void;
|
|
76
76
|
|
|
77
77
|
// Arcs layer
|
|
@@ -92,8 +92,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
92
92
|
arcDashAnimateTime?: ObjAccessor<number>;
|
|
93
93
|
arcsTransitionDuration?: number;
|
|
94
94
|
arcLabel?: ObjAccessor<string>;
|
|
95
|
-
onArcClick?: (arc: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
96
|
-
onArcRightClick?: (arc: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
95
|
+
onArcClick?: (arc: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
96
|
+
onArcRightClick?: (arc: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
97
97
|
onArcHover?: (arc: object | null, prevArc: object | null) => void;
|
|
98
98
|
|
|
99
99
|
// Polygons layer
|
|
@@ -108,8 +108,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
108
108
|
polygonCapCurvatureResolution?: ObjAccessor<number>;
|
|
109
109
|
polygonsTransitionDuration?: number;
|
|
110
110
|
polygonLabel?: ObjAccessor<string>;
|
|
111
|
-
onPolygonClick?: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
112
|
-
onPolygonRightClick?: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
111
|
+
onPolygonClick?: (polygon: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
112
|
+
onPolygonRightClick?: (polygon: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
113
113
|
onPolygonHover?: (polygon: object | null, prevPolygon: object | null) => void;
|
|
114
114
|
|
|
115
115
|
// Paths layer
|
|
@@ -127,8 +127,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
127
127
|
pathDashAnimateTime?: ObjAccessor<number>;
|
|
128
128
|
pathTransitionDuration?: number;
|
|
129
129
|
pathLabel?: ObjAccessor<string>;
|
|
130
|
-
onPathClick?: (path: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
131
|
-
onPathRightClick?: (path: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
130
|
+
onPathClick?: (path: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
131
|
+
onPathRightClick?: (path: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
132
132
|
onPathHover?: (path: object | null, prevPath: object | null) => void;
|
|
133
133
|
|
|
134
134
|
// Hex Bin layer
|
|
@@ -145,8 +145,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
145
145
|
hexBinMerge?: boolean;
|
|
146
146
|
hexTransitionDuration?: number;
|
|
147
147
|
hexLabel?: HexBinAccessor<string>;
|
|
148
|
-
onHexClick?: (hex: HexBin, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
149
|
-
onHexRightClick?: (hex: HexBin, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
148
|
+
onHexClick?: (hex: HexBin, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
149
|
+
onHexRightClick?: (hex: HexBin, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
150
150
|
onHexHover?: (hex: HexBin | null, prevHex: HexBin | null) => void;
|
|
151
151
|
|
|
152
152
|
// Hexed Polygons layer
|
|
@@ -159,8 +159,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
159
159
|
hexPolygonCurvatureResolution?: ObjAccessor<number>;
|
|
160
160
|
hexPolygonsTransitionDuration?: number;
|
|
161
161
|
hexPolygonLabel?: ObjAccessor<string>;
|
|
162
|
-
onHexPolygonClick?: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
163
|
-
onHexPolygonRightClick?: (polygon: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
162
|
+
onHexPolygonClick?: (polygon: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
163
|
+
onHexPolygonRightClick?: (polygon: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
164
164
|
onHexPolygonHover?: (polygon: object | null, prevPolygon: object | null) => void;
|
|
165
165
|
|
|
166
166
|
// Tiles layer
|
|
@@ -175,8 +175,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
175
175
|
tileCurvatureResolution?: ObjAccessor<number>;
|
|
176
176
|
tilesTransitionDuration?: number;
|
|
177
177
|
tileLabel?: ObjAccessor<string>;
|
|
178
|
-
onTileClick?: (tile: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
179
|
-
onTileRightClick?: (tile: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
178
|
+
onTileClick?: (tile: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
179
|
+
onTileRightClick?: (tile: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
180
180
|
onTileHover?: (tile: object | null, prevTile: object | null) => void;
|
|
181
181
|
|
|
182
182
|
// Rings Layer
|
|
@@ -206,8 +206,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
206
206
|
labelDotOrientation?: ObjAccessor<LabelOrientation>;
|
|
207
207
|
labelsTransitionDuration?: number;
|
|
208
208
|
labelLabel?: ObjAccessor<string>;
|
|
209
|
-
onLabelClick?: (label: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
210
|
-
onLabelRightClick?: (label: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
209
|
+
onLabelClick?: (label: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
210
|
+
onLabelRightClick?: (label: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
211
211
|
onLabelHover?: (label: object | null, prevLabel: object | null) => void;
|
|
212
212
|
|
|
213
213
|
// Custom layer
|
|
@@ -215,8 +215,8 @@ interface GlobeProps extends ConfigOptions {
|
|
|
215
215
|
customThreeObject?: Object3D | string | ((d: object, globeRadius: number) => Object3D);
|
|
216
216
|
customThreeObjectUpdate?: string | ((obj: Object3D, objData: object, globeRadius: number) => void);
|
|
217
217
|
customLayerLabel?: ObjAccessor<string>;
|
|
218
|
-
onCustomLayerClick?: (obj: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
219
|
-
onCustomLayerRightClick?: (obj: object, event: MouseEvent, coords: { lat, lng, altitude }) => void;
|
|
218
|
+
onCustomLayerClick?: (obj: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
219
|
+
onCustomLayerRightClick?: (obj: object, event: MouseEvent, coords: { lat: number, lng: number, altitude: number }) => void;
|
|
220
220
|
onCustomLayerHover?: (obj: object | null, prevObj: object | null) => void;
|
|
221
221
|
|
|
222
222
|
// Render control
|