react-globe.gl 2.18.11
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/LICENSE +21 -0
- package/README.md +310 -0
- package/dist/react-globe.gl.common.js +174 -0
- package/dist/react-globe.gl.d.ts +241 -0
- package/dist/react-globe.gl.js +79238 -0
- package/dist/react-globe.gl.js.map +1 -0
- package/dist/react-globe.gl.min.js +20 -0
- package/dist/react-globe.gl.module.js +166 -0
- package/package.json +65 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import fromKapsule from 'react-kapsule';
|
|
2
|
+
import GlobeKapsule from 'globe.gl';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
|
|
5
|
+
var GlobePropTypes = {
|
|
6
|
+
width: PropTypes.number,
|
|
7
|
+
height: PropTypes.number,
|
|
8
|
+
backgroundColor: PropTypes.string,
|
|
9
|
+
backgroundImageUrl: PropTypes.string,
|
|
10
|
+
globeImageUrl: PropTypes.string,
|
|
11
|
+
bumpImageUrl: PropTypes.string,
|
|
12
|
+
showGlobe: PropTypes.bool,
|
|
13
|
+
showGraticules: PropTypes.bool,
|
|
14
|
+
showAtmosphere: PropTypes.bool,
|
|
15
|
+
atmosphereColor: PropTypes.string,
|
|
16
|
+
atmosphereAltitude: PropTypes.number,
|
|
17
|
+
globeMaterial: PropTypes.object,
|
|
18
|
+
onGlobeReady: PropTypes.func,
|
|
19
|
+
onGlobeClick: PropTypes.func,
|
|
20
|
+
onGlobeRightClick: PropTypes.func,
|
|
21
|
+
pointsData: PropTypes.arrayOf(PropTypes.object),
|
|
22
|
+
pointLat: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
23
|
+
pointLng: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
24
|
+
pointColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
25
|
+
pointAltitude: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
26
|
+
pointRadius: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
27
|
+
pointResolution: PropTypes.number,
|
|
28
|
+
pointsMerge: PropTypes.bool,
|
|
29
|
+
pointsTransitionDuration: PropTypes.number,
|
|
30
|
+
pointLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
31
|
+
onPointClick: PropTypes.func,
|
|
32
|
+
onPointRightClick: PropTypes.func,
|
|
33
|
+
onPointHover: PropTypes.func,
|
|
34
|
+
arcsData: PropTypes.arrayOf(PropTypes.object),
|
|
35
|
+
arcStartLat: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
36
|
+
arcStartLng: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
37
|
+
arcEndLat: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
38
|
+
arcEndLng: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
39
|
+
arcColor: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
40
|
+
arcAltitude: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
41
|
+
arcAltitudeAutoScale: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
42
|
+
arcStroke: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
43
|
+
arcCurveResolution: PropTypes.number,
|
|
44
|
+
arcCircularResolution: PropTypes.number,
|
|
45
|
+
arcDashLength: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
46
|
+
arcDashGap: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
47
|
+
arcDashInitialGap: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
48
|
+
arcDashAnimateTime: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
49
|
+
arcsTransitionDuration: PropTypes.number,
|
|
50
|
+
arcLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
51
|
+
onArcClick: PropTypes.func,
|
|
52
|
+
onArcRightClick: PropTypes.func,
|
|
53
|
+
onArcHover: PropTypes.func,
|
|
54
|
+
polygonsData: PropTypes.arrayOf(PropTypes.object),
|
|
55
|
+
polygonGeoJsonGeometry: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
56
|
+
polygonCapColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
57
|
+
polygonCapMaterial: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),
|
|
58
|
+
polygonSideColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
59
|
+
polygonSideMaterial: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),
|
|
60
|
+
polygonStrokeColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
61
|
+
polygonAltitude: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
62
|
+
polygonCapCurvatureResolution: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
63
|
+
polygonsTransitionDuration: PropTypes.number,
|
|
64
|
+
polygonLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
65
|
+
onPolygonClick: PropTypes.func,
|
|
66
|
+
onPolygonRightClick: PropTypes.func,
|
|
67
|
+
onPolygonHover: PropTypes.func,
|
|
68
|
+
pathsData: PropTypes.array,
|
|
69
|
+
pathPoints: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.func]),
|
|
70
|
+
pathPointLat: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
71
|
+
pathPointLng: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
72
|
+
pathPointAlt: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
73
|
+
pathResolution: PropTypes.number,
|
|
74
|
+
pathColor: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
|
|
75
|
+
pathStroke: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
76
|
+
pathDashLength: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
77
|
+
pathDashGap: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
78
|
+
pathDashInitialGap: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
79
|
+
pathDashAnimateTime: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
80
|
+
pathTransitionDuration: PropTypes.number,
|
|
81
|
+
pathLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
82
|
+
onPathClick: PropTypes.func,
|
|
83
|
+
onPathRightClick: PropTypes.func,
|
|
84
|
+
onPathHover: PropTypes.func,
|
|
85
|
+
hexBinPointsData: PropTypes.arrayOf(PropTypes.object),
|
|
86
|
+
hexBinPointLat: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
87
|
+
hexBinPointLng: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
88
|
+
hexBinPointWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
89
|
+
hexBinResolution: PropTypes.number,
|
|
90
|
+
hexMargin: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
|
|
91
|
+
hexTopColor: PropTypes.func,
|
|
92
|
+
hexSideColor: PropTypes.func,
|
|
93
|
+
hexAltitude: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
|
|
94
|
+
hexTopCurvatureResolution: PropTypes.number,
|
|
95
|
+
hexBinMerge: PropTypes.bool,
|
|
96
|
+
hexTransitionDuration: PropTypes.number,
|
|
97
|
+
hexLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
98
|
+
onHexClick: PropTypes.func,
|
|
99
|
+
onHexRightClick: PropTypes.func,
|
|
100
|
+
onHexHover: PropTypes.func,
|
|
101
|
+
hexPolygonsData: PropTypes.arrayOf(PropTypes.object),
|
|
102
|
+
hexPolygonGeoJsonGeometry: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
103
|
+
hexPolygonColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
104
|
+
hexPolygonAltitude: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
105
|
+
hexPolygonResolution: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
106
|
+
hexPolygonMargin: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
107
|
+
hexPolygonCurvatureResolution: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
108
|
+
hexPolygonsTransitionDuration: PropTypes.number,
|
|
109
|
+
hexPolygonLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
110
|
+
onHexPolygonClick: PropTypes.func,
|
|
111
|
+
onHexPolygonRightClick: PropTypes.func,
|
|
112
|
+
onHexPolygonHover: PropTypes.func,
|
|
113
|
+
tilesData: PropTypes.arrayOf(PropTypes.object),
|
|
114
|
+
tileLat: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
115
|
+
tileLng: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
116
|
+
tileAltitude: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
117
|
+
tileWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
118
|
+
tileHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
119
|
+
tileUseGlobeProjection: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.func]),
|
|
120
|
+
tileMaterial: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),
|
|
121
|
+
tileCurvatureResolution: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
122
|
+
tilesTransitionDuration: PropTypes.number,
|
|
123
|
+
tileLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
124
|
+
onTileClick: PropTypes.func,
|
|
125
|
+
onTileRightClick: PropTypes.func,
|
|
126
|
+
onTileHover: PropTypes.func,
|
|
127
|
+
labelsData: PropTypes.arrayOf(PropTypes.object),
|
|
128
|
+
labelLat: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
129
|
+
labelLng: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
130
|
+
labelAltitude: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
131
|
+
labelRotation: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
132
|
+
labelText: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
133
|
+
labelSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
134
|
+
labelTypeFace: PropTypes.object,
|
|
135
|
+
labelColor: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
136
|
+
labelResolution: PropTypes.number,
|
|
137
|
+
labelIncludeDot: PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.func]),
|
|
138
|
+
labelDotRadius: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.func]),
|
|
139
|
+
labelDotOrientation: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
140
|
+
labelsTransitionDuration: PropTypes.number,
|
|
141
|
+
labelLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
142
|
+
onLabelClick: PropTypes.func,
|
|
143
|
+
onLabelRightClick: PropTypes.func,
|
|
144
|
+
onLabelHover: PropTypes.func,
|
|
145
|
+
customLayerData: PropTypes.arrayOf(PropTypes.object),
|
|
146
|
+
customThreeObject: PropTypes.oneOfType([PropTypes.object, PropTypes.string, PropTypes.func]),
|
|
147
|
+
customThreeObjectUpdate: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
148
|
+
customLayerLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
149
|
+
onCustomLayerClick: PropTypes.func,
|
|
150
|
+
onCustomLayerRightClick: PropTypes.func,
|
|
151
|
+
onCustomLayerHover: PropTypes.func,
|
|
152
|
+
enablePointerInteraction: PropTypes.bool,
|
|
153
|
+
pointerEventsFilter: PropTypes.func,
|
|
154
|
+
lineHoverPrecision: PropTypes.number,
|
|
155
|
+
onZoom: PropTypes.func
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
var Globe = fromKapsule(GlobeKapsule, {
|
|
159
|
+
methodNames: [// bind methods
|
|
160
|
+
'pauseAnimation', 'resumeAnimation', 'pointOfView', 'scene', 'camera', 'renderer', 'postProcessingComposer', 'controls', 'getCoords', 'getScreenCoords', 'toGeoCoords', 'toGlobeCoords'],
|
|
161
|
+
initPropNames: ['animateIn', 'waitForGlobeReady', 'rendererConfig']
|
|
162
|
+
});
|
|
163
|
+
Globe.displayName = 'Globe';
|
|
164
|
+
Globe.propTypes = GlobePropTypes;
|
|
165
|
+
|
|
166
|
+
export { Globe as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-globe.gl",
|
|
3
|
+
"version": "2.18.11",
|
|
4
|
+
"description": "React component for Globe Data Visualization using ThreeJS/WebGL",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"unpkg": "dist/react-globe.gl.min.js",
|
|
7
|
+
"main": "dist/react-globe.gl.common.js",
|
|
8
|
+
"module": "dist/react-globe.gl.module.js",
|
|
9
|
+
"types": "dist/react-globe.gl.d.ts",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/vasturiano/react-globe.gl.git"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"react",
|
|
16
|
+
"webgl",
|
|
17
|
+
"three",
|
|
18
|
+
"globe",
|
|
19
|
+
"geo",
|
|
20
|
+
"spherical",
|
|
21
|
+
"projection",
|
|
22
|
+
"orthographic"
|
|
23
|
+
],
|
|
24
|
+
"author": {
|
|
25
|
+
"name": "Vasco Asturiano",
|
|
26
|
+
"url": "https://bl.ocks.org/vasturiano"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/vasturiano/react-globe.gl/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/vasturiano/react-globe.gl",
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "rimraf dist && rollup -c",
|
|
34
|
+
"dev": "rollup -w -c rollup.config.dev.js",
|
|
35
|
+
"prepare": "npm run build"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist/**/*"
|
|
39
|
+
],
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"globe.gl": "^2.22",
|
|
42
|
+
"prop-types": "^15.7",
|
|
43
|
+
"react-kapsule": "^2.2"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react": "*"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@babel/core": "^7.15.0",
|
|
50
|
+
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
|
51
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.14.7",
|
|
52
|
+
"@babel/preset-env": "^7.15.0",
|
|
53
|
+
"@babel/preset-react": "^7.14.5",
|
|
54
|
+
"@rollup/plugin-babel": "^5.3.0",
|
|
55
|
+
"@rollup/plugin-commonjs": "^20.0.0",
|
|
56
|
+
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
57
|
+
"@rollup/plugin-replace": "^3.0.0",
|
|
58
|
+
"@types/react": "^17.0.19",
|
|
59
|
+
"rimraf": "^3.0.2",
|
|
60
|
+
"rollup": "^2.56.3",
|
|
61
|
+
"rollup-plugin-dts": "^3.0.2",
|
|
62
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
63
|
+
"typescript": "^4.4.2"
|
|
64
|
+
}
|
|
65
|
+
}
|