globe.gl 2.39.7 → 2.40.0
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 +1 -0
- package/dist/globe.gl.d.ts +2 -0
- package/dist/globe.gl.js +101 -73
- package/dist/globe.gl.js.map +1 -1
- package/dist/globe.gl.min.js +2 -2
- package/dist/globe.gl.mjs +17 -8
- package/package.json +6 -6
package/dist/globe.gl.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import Kapsule from 'kapsule';
|
|
|
7
7
|
import { Group, Tween, Easing } from '@tweenjs/tween.js';
|
|
8
8
|
|
|
9
9
|
function styleInject(css, ref) {
|
|
10
|
-
if (ref ===
|
|
10
|
+
if (ref === void 0) ref = {};
|
|
11
11
|
var insertAt = ref.insertAt;
|
|
12
12
|
if (typeof document === 'undefined') {
|
|
13
13
|
return;
|
|
@@ -103,7 +103,7 @@ function _toConsumableArray(r) {
|
|
|
103
103
|
function _toPrimitive(t, r) {
|
|
104
104
|
if ("object" != typeof t || !t) return t;
|
|
105
105
|
var e = t[Symbol.toPrimitive];
|
|
106
|
-
if (
|
|
106
|
+
if (void 0 !== e) {
|
|
107
107
|
var i = e.call(t, r);
|
|
108
108
|
if ("object" != typeof i) return i;
|
|
109
109
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
@@ -118,7 +118,7 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
118
118
|
if (r) {
|
|
119
119
|
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
120
120
|
var t = {}.toString.call(r).slice(8, -1);
|
|
121
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) :
|
|
121
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
@@ -357,6 +357,15 @@ var globe = Kapsule({
|
|
|
357
357
|
state.renderObjs.lineHoverPrecision(val);
|
|
358
358
|
state.renderObjs.pointsHoverPrecision(val);
|
|
359
359
|
}
|
|
360
|
+
},
|
|
361
|
+
globeOffset: {
|
|
362
|
+
"default": [0, 0],
|
|
363
|
+
triggerUpdate: false,
|
|
364
|
+
onChange: function onChange(o, state) {
|
|
365
|
+
return Array.isArray(o) && o.length === 2 && state.renderObjs.viewOffset(o.map(function (v) {
|
|
366
|
+
return -v;
|
|
367
|
+
}));
|
|
368
|
+
}
|
|
360
369
|
}
|
|
361
370
|
}, linkedGlobeProps), linkedRenderObjsProps),
|
|
362
371
|
methods: _objectSpread2(_objectSpread2({
|
|
@@ -366,7 +375,7 @@ var globe = Kapsule({
|
|
|
366
375
|
cancelAnimationFrame(state.animationFrameRequestId);
|
|
367
376
|
state.animationFrameRequestId = null;
|
|
368
377
|
}
|
|
369
|
-
(_state$globe = state.globe) === null || _state$globe ===
|
|
378
|
+
(_state$globe = state.globe) === null || _state$globe === void 0 || _state$globe.pauseAnimation();
|
|
370
379
|
return this;
|
|
371
380
|
},
|
|
372
381
|
resumeAnimation: function resumeAnimation(state) {
|
|
@@ -374,7 +383,7 @@ var globe = Kapsule({
|
|
|
374
383
|
if (state.animationFrameRequestId === null) {
|
|
375
384
|
this._animationCycle();
|
|
376
385
|
}
|
|
377
|
-
(_state$globe2 = state.globe) === null || _state$globe2 ===
|
|
386
|
+
(_state$globe2 = state.globe) === null || _state$globe2 === void 0 || _state$globe2.resumeAnimation();
|
|
378
387
|
return this;
|
|
379
388
|
},
|
|
380
389
|
_animationCycle: function _animationCycle(state) {
|
|
@@ -482,7 +491,7 @@ var globe = Kapsule({
|
|
|
482
491
|
stateInit: function stateInit(_ref6) {
|
|
483
492
|
var rendererConfig = _ref6.rendererConfig,
|
|
484
493
|
_ref6$waitForGlobeRea = _ref6.waitForGlobeReady,
|
|
485
|
-
waitForGlobeReady = _ref6$waitForGlobeRea ===
|
|
494
|
+
waitForGlobeReady = _ref6$waitForGlobeRea === void 0 ? true : _ref6$waitForGlobeRea,
|
|
486
495
|
globeInitConfig = _objectWithoutProperties(_ref6, _excluded);
|
|
487
496
|
var globe = new ThreeGlobe(_objectSpread2({
|
|
488
497
|
waitForGlobeReady: waitForGlobeReady
|
|
@@ -704,7 +713,7 @@ var globe = Kapsule({
|
|
|
704
713
|
var args = [ev];
|
|
705
714
|
|
|
706
715
|
// include click coords
|
|
707
|
-
var point = intersection !== null && intersection !==
|
|
716
|
+
var point = intersection !== null && intersection !== void 0 && intersection.isVector3 ? intersection : intersection === null || intersection === void 0 ? void 0 : intersection.point;
|
|
708
717
|
if (objType === 'globe') {
|
|
709
718
|
var _this$toGeoCoords = _this.toGeoCoords(point),
|
|
710
719
|
lat = _this$toGeoCoords.lat,
|
|
@@ -744,7 +753,7 @@ var globe = Kapsule({
|
|
|
744
753
|
var args = [ev];
|
|
745
754
|
|
|
746
755
|
// include click coords
|
|
747
|
-
var point = intersection !== null && intersection !==
|
|
756
|
+
var point = intersection !== null && intersection !== void 0 && intersection.isVector3 ? intersection : intersection === null || intersection === void 0 ? void 0 : intersection.point;
|
|
748
757
|
if (objType === 'globe') {
|
|
749
758
|
var _this$toGeoCoords2 = _this.toGeoCoords(point),
|
|
750
759
|
lat = _this$toGeoCoords2.lat,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "globe.gl",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.40.0",
|
|
4
4
|
"description": "UI component for Globe Data Visualization using ThreeJS/WebGL",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"unpkg": "dist/globe.gl.min.js",
|
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
"kapsule": "^1.16",
|
|
54
54
|
"three": ">=0.154 <1",
|
|
55
55
|
"three-globe": "^2.41",
|
|
56
|
-
"three-render-objects": "^1.
|
|
56
|
+
"three-render-objects": "^1.39"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@babel/core": "^7.26.
|
|
60
|
-
"@babel/preset-env": "^7.26.
|
|
59
|
+
"@babel/core": "^7.26.9",
|
|
60
|
+
"@babel/preset-env": "^7.26.9",
|
|
61
61
|
"@rollup/plugin-babel": "^6.0.4",
|
|
62
62
|
"@rollup/plugin-commonjs": "^28.0.2",
|
|
63
63
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
64
64
|
"@rollup/plugin-terser": "^0.4.4",
|
|
65
|
-
"postcss": "^8.5.
|
|
65
|
+
"postcss": "^8.5.2",
|
|
66
66
|
"rimraf": "^6.0.1",
|
|
67
|
-
"rollup": "^4.34.
|
|
67
|
+
"rollup": "^4.34.8",
|
|
68
68
|
"rollup-plugin-dts": "^6.1.1",
|
|
69
69
|
"rollup-plugin-postcss": "^4.0.2",
|
|
70
70
|
"typescript": "^5.7.3"
|