globe.gl 2.32.1 → 2.32.3
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/dist/globe.gl.js +3526 -1991
- package/dist/globe.gl.js.map +1 -1
- package/dist/globe.gl.min.js +5 -5
- package/dist/globe.gl.mjs +18 -17
- package/example/clouds/index.html +3 -3
- package/example/custom-globe-styling/index.html +2 -3
- package/example/custom-layer/index.html +3 -3
- package/example/hollow-globe/index.html +3 -2
- package/example/satellites/index.html +3 -2
- package/example/solar-terminator/index.html +4 -4
- package/example/tiles/index.html +3 -3
- package/package.json +8 -8
package/dist/globe.gl.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AmbientLight, DirectionalLight, Vector2 } from 'three';
|
|
1
|
+
import { AmbientLight, DirectionalLight, Vector2, REVISION } from 'three';
|
|
2
2
|
import { CSS2DRenderer } from 'three/examples/jsm/renderers/CSS2DRenderer.js';
|
|
3
3
|
import ThreeGlobe from 'three-globe';
|
|
4
4
|
import ThreeRenderObjects from 'three-render-objects';
|
|
@@ -55,6 +55,20 @@ function _objectSpread2(e) {
|
|
|
55
55
|
}
|
|
56
56
|
return e;
|
|
57
57
|
}
|
|
58
|
+
function _toPrimitive(t, r) {
|
|
59
|
+
if ("object" != typeof t || !t) return t;
|
|
60
|
+
var e = t[Symbol.toPrimitive];
|
|
61
|
+
if (void 0 !== e) {
|
|
62
|
+
var i = e.call(t, r || "default");
|
|
63
|
+
if ("object" != typeof i) return i;
|
|
64
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
65
|
+
}
|
|
66
|
+
return ("string" === r ? String : Number)(t);
|
|
67
|
+
}
|
|
68
|
+
function _toPropertyKey(t) {
|
|
69
|
+
var i = _toPrimitive(t, "string");
|
|
70
|
+
return "symbol" == typeof i ? i : i + "";
|
|
71
|
+
}
|
|
58
72
|
function _defineProperty(obj, key, value) {
|
|
59
73
|
key = _toPropertyKey(key);
|
|
60
74
|
if (key in obj) {
|
|
@@ -121,20 +135,6 @@ function _arrayLikeToArray(arr, len) {
|
|
|
121
135
|
function _nonIterableSpread() {
|
|
122
136
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
123
137
|
}
|
|
124
|
-
function _toPrimitive(input, hint) {
|
|
125
|
-
if (typeof input !== "object" || input === null) return input;
|
|
126
|
-
var prim = input[Symbol.toPrimitive];
|
|
127
|
-
if (prim !== undefined) {
|
|
128
|
-
var res = prim.call(input, hint || "default");
|
|
129
|
-
if (typeof res !== "object") return res;
|
|
130
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
131
|
-
}
|
|
132
|
-
return (hint === "string" ? String : Number)(input);
|
|
133
|
-
}
|
|
134
|
-
function _toPropertyKey(arg) {
|
|
135
|
-
var key = _toPrimitive(arg, "string");
|
|
136
|
-
return typeof key === "symbol" ? key : String(key);
|
|
137
|
-
}
|
|
138
138
|
|
|
139
139
|
function linkKapsule (kapsulePropName, kapsuleType) {
|
|
140
140
|
var dummyK = new kapsuleType(); // To extract defaults
|
|
@@ -170,7 +170,8 @@ var THREE = _objectSpread2(_objectSpread2({}, window.THREE ? window.THREE // Pre
|
|
|
170
170
|
: {
|
|
171
171
|
AmbientLight: AmbientLight,
|
|
172
172
|
DirectionalLight: DirectionalLight,
|
|
173
|
-
Vector2: Vector2
|
|
173
|
+
Vector2: Vector2,
|
|
174
|
+
REVISION: REVISION
|
|
174
175
|
}), {}, {
|
|
175
176
|
CSS2DRenderer: CSS2DRenderer
|
|
176
177
|
});
|
|
@@ -586,7 +587,7 @@ var globe = Kapsule({
|
|
|
586
587
|
return d;
|
|
587
588
|
}
|
|
588
589
|
};
|
|
589
|
-
state.renderObjs.renderer().useLegacyLights = false; // force behavior of three < 155
|
|
590
|
+
THREE.REVISION < 155 && (state.renderObjs.renderer().useLegacyLights = false); // force behavior of three < 155
|
|
590
591
|
state.renderObjs.hoverOrderComparator(function (a, b) {
|
|
591
592
|
var aObj = getGlobeObj(a);
|
|
592
593
|
var bObj = getGlobeObj(b);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<head>
|
|
2
2
|
<style> body { margin: 0; } </style>
|
|
3
3
|
|
|
4
|
-
<script src="//unpkg.com/three"></script>
|
|
5
|
-
|
|
6
4
|
<script src="//unpkg.com/globe.gl"></script>
|
|
7
5
|
<!--<script src="../../dist/globe.gl.js"></script>-->
|
|
8
6
|
</head>
|
|
@@ -10,7 +8,9 @@
|
|
|
10
8
|
<body>
|
|
11
9
|
<div id="globeViz"></div>
|
|
12
10
|
|
|
13
|
-
<script>
|
|
11
|
+
<script type="module">
|
|
12
|
+
import * as THREE from '//unpkg.com/three/build/three.module.js';
|
|
13
|
+
|
|
14
14
|
const world = Globe({ animateIn: false })
|
|
15
15
|
(document.getElementById('globeViz'))
|
|
16
16
|
.globeImageUrl('//unpkg.com/three-globe/example/img/earth-blue-marble.jpg')
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<head>
|
|
2
2
|
<style> body { margin: 0; } </style>
|
|
3
3
|
|
|
4
|
-
<script src="//unpkg.com/three"></script>
|
|
5
|
-
|
|
6
4
|
<script src="//unpkg.com/globe.gl"></script>
|
|
7
5
|
<!-- <script src="../../dist/globe.gl.js"></script>-->
|
|
8
6
|
</head>
|
|
@@ -10,7 +8,8 @@
|
|
|
10
8
|
<body>
|
|
11
9
|
<div id="globeViz"></div>
|
|
12
10
|
|
|
13
|
-
<script>
|
|
11
|
+
<script type="module">
|
|
12
|
+
import * as THREE from '//unpkg.com/three/build/three.module.js';
|
|
14
13
|
|
|
15
14
|
const world = Globe()
|
|
16
15
|
.globeImageUrl('//unpkg.com/three-globe/example/img/earth-blue-marble.jpg')
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<head>
|
|
2
2
|
<style> body { margin: 0; } </style>
|
|
3
3
|
|
|
4
|
-
<script src="//unpkg.com/three"></script>
|
|
5
|
-
|
|
6
4
|
<script src="//unpkg.com/globe.gl"></script>
|
|
7
5
|
<!--<script src="../../dist/globe.gl.js"></script>-->
|
|
8
6
|
</head>
|
|
@@ -10,7 +8,9 @@
|
|
|
10
8
|
<body>
|
|
11
9
|
<div id="globeViz"></div>
|
|
12
10
|
|
|
13
|
-
<script>
|
|
11
|
+
<script type="module">
|
|
12
|
+
import * as THREE from '//unpkg.com/three/build/three.module.js';
|
|
13
|
+
|
|
14
14
|
// Gen random data
|
|
15
15
|
const N = 300;
|
|
16
16
|
const gData = [...Array(N).keys()].map(() => ({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<head>
|
|
2
2
|
<style> body { margin: 0; } </style>
|
|
3
3
|
|
|
4
|
-
<script src="//unpkg.com/three"></script>
|
|
5
4
|
<script src="//unpkg.com/topojson-client"></script>
|
|
6
5
|
|
|
7
6
|
<script src="//unpkg.com/globe.gl"></script>
|
|
@@ -11,7 +10,9 @@
|
|
|
11
10
|
<body>
|
|
12
11
|
<div id="globeViz"></div>
|
|
13
12
|
|
|
14
|
-
<script>
|
|
13
|
+
<script type="module">
|
|
14
|
+
import * as THREE from '//unpkg.com/three/build/three.module.js';
|
|
15
|
+
|
|
15
16
|
const world = Globe()
|
|
16
17
|
(document.getElementById('globeViz'))
|
|
17
18
|
.backgroundColor('rgba(0,0,0,0)')
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
17
|
|
|
18
|
-
<script src="//unpkg.com/three"></script>
|
|
19
18
|
<script src="//unpkg.com/satellite.js/dist/satellite.min.js"></script>
|
|
20
19
|
|
|
21
20
|
<script src="//unpkg.com/globe.gl"></script>
|
|
@@ -26,7 +25,9 @@
|
|
|
26
25
|
<div id="chart"></div>
|
|
27
26
|
<div id="time-log"></div>
|
|
28
27
|
|
|
29
|
-
<script>
|
|
28
|
+
<script type="module">
|
|
29
|
+
import * as THREE from '//unpkg.com/three/build/three.module.js';
|
|
30
|
+
|
|
30
31
|
const EARTH_RADIUS_KM = 6371; // km
|
|
31
32
|
const SAT_SIZE = 100; // km
|
|
32
33
|
const TIME_STEP = 3 * 1000; // per frame
|
|
@@ -13,9 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
</style>
|
|
15
15
|
|
|
16
|
-
<script src="//unpkg.com/
|
|
17
|
-
|
|
18
|
-
<script src="//unpkg.com/globe.gl"></script>
|
|
16
|
+
<script src="//unpkg.com/globe.gl"></script>
|
|
19
17
|
<!-- <script src="../../dist/globe.gl.js"></script>-->
|
|
20
18
|
|
|
21
19
|
<script src="//unpkg.com/solar-calculator"></script>
|
|
@@ -25,7 +23,9 @@
|
|
|
25
23
|
<div id="globeViz"></div>
|
|
26
24
|
<div id="time"></div>
|
|
27
25
|
|
|
28
|
-
<script>
|
|
26
|
+
<script type="module">
|
|
27
|
+
import * as THREE from '//unpkg.com/three/build/three.module.js';
|
|
28
|
+
|
|
29
29
|
const VELOCITY = 9; // minutes per frame
|
|
30
30
|
|
|
31
31
|
const sunPosAt = dt => {
|
package/example/tiles/index.html
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<head>
|
|
2
2
|
<style> body { margin: 0; } </style>
|
|
3
3
|
|
|
4
|
-
<script src="//unpkg.com/three"></script>
|
|
5
|
-
|
|
6
4
|
<script src="//unpkg.com/globe.gl"></script>
|
|
7
5
|
<!-- <script src="../../dist/globe.gl.js"></script>-->
|
|
8
6
|
</head>
|
|
@@ -10,7 +8,9 @@
|
|
|
10
8
|
<body>
|
|
11
9
|
<div id="globeViz"></div>
|
|
12
10
|
|
|
13
|
-
<script>
|
|
11
|
+
<script type="module">
|
|
12
|
+
import * as THREE from '//unpkg.com/three/build/three.module.js';
|
|
13
|
+
|
|
14
14
|
const TILE_MARGIN = 0.35; // degrees
|
|
15
15
|
|
|
16
16
|
// Gen random data
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "globe.gl",
|
|
3
|
-
"version": "2.32.
|
|
3
|
+
"version": "2.32.3",
|
|
4
4
|
"description": "UI component for Globe Data Visualization using ThreeJS/WebGL",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"unpkg": "dist/globe.gl.min.js",
|
|
@@ -48,26 +48,26 @@
|
|
|
48
48
|
"example/**/*"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@tweenjs/tween.js": "18 -
|
|
51
|
+
"@tweenjs/tween.js": "18 - 23",
|
|
52
52
|
"accessor-fn": "1",
|
|
53
53
|
"kapsule": "1",
|
|
54
54
|
"three": ">=0.118 <1",
|
|
55
|
-
"three-globe": "^2.
|
|
55
|
+
"three-globe": "^2.31",
|
|
56
56
|
"three-render-objects": "^1.29"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@babel/core": "^7.
|
|
60
|
-
"@babel/preset-env": "^7.
|
|
59
|
+
"@babel/core": "^7.24.3",
|
|
60
|
+
"@babel/preset-env": "^7.24.3",
|
|
61
61
|
"@rollup/plugin-babel": "^6.0.4",
|
|
62
62
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
63
63
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
64
64
|
"@rollup/plugin-terser": "^0.4.4",
|
|
65
|
-
"postcss": "^8.4.
|
|
65
|
+
"postcss": "^8.4.38",
|
|
66
66
|
"rimraf": "^5.0.5",
|
|
67
|
-
"rollup": "^4.1
|
|
67
|
+
"rollup": "^4.13.1",
|
|
68
68
|
"rollup-plugin-dts": "^6.1.0",
|
|
69
69
|
"rollup-plugin-postcss": "^4.0.2",
|
|
70
|
-
"typescript": "^5.
|
|
70
|
+
"typescript": "^5.4.3"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": ">=12"
|