globe.gl 2.28.0 → 2.28.2
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.d.ts +1 -1
- package/dist/globe.gl.js +69 -12
- package/dist/globe.gl.js.map +1 -1
- package/dist/globe.gl.min.js +5 -5
- package/dist/globe.gl.mjs +6 -2
- package/example/satellites/index.html +1 -0
- package/package.json +2 -2
package/dist/globe.gl.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ interface GeoCoords {
|
|
|
25
25
|
type PointerEventsFilterFn = (object: Object3D, data?: object) => boolean;
|
|
26
26
|
|
|
27
27
|
// don't surface these internal props from inner ThreeGlobe
|
|
28
|
-
type ExcludedInnerProps = 'setPointOfView';
|
|
28
|
+
type ExcludedInnerProps = 'setPointOfView' | 'pauseAnimation' | 'resumeAnimation';
|
|
29
29
|
|
|
30
30
|
interface GlobeGenericInstance<ChainableInstance>
|
|
31
31
|
extends Omit<ThreeGlobeGeneric<ChainableInstance>, ExcludedInnerProps> {
|
package/dist/globe.gl.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Version 2.28.
|
|
1
|
+
// Version 2.28.2 globe.gl - https://github.com/vasturiano/globe.gl
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -65469,8 +65469,17 @@
|
|
|
65469
65469
|
},
|
|
65470
65470
|
|
|
65471
65471
|
methods: {
|
|
65472
|
+
pauseAnimation: function pauseAnimation(state) {
|
|
65473
|
+
var _state$ticker;
|
|
65474
|
+
(_state$ticker = state.ticker) === null || _state$ticker === void 0 ? void 0 : _state$ticker.pause();
|
|
65475
|
+
},
|
|
65476
|
+
resumeAnimation: function resumeAnimation(state) {
|
|
65477
|
+
var _state$ticker2;
|
|
65478
|
+
(_state$ticker2 = state.ticker) === null || _state$ticker2 === void 0 ? void 0 : _state$ticker2.resume();
|
|
65479
|
+
},
|
|
65472
65480
|
_destructor: function _destructor(state) {
|
|
65473
|
-
|
|
65481
|
+
var _state$ticker3;
|
|
65482
|
+
(_state$ticker3 = state.ticker) === null || _state$ticker3 === void 0 ? void 0 : _state$ticker3.dispose();
|
|
65474
65483
|
}
|
|
65475
65484
|
},
|
|
65476
65485
|
init: function init(threeObj, state) {
|
|
@@ -66477,8 +66486,17 @@
|
|
|
66477
66486
|
},
|
|
66478
66487
|
|
|
66479
66488
|
methods: {
|
|
66489
|
+
pauseAnimation: function pauseAnimation(state) {
|
|
66490
|
+
var _state$ticker;
|
|
66491
|
+
(_state$ticker = state.ticker) === null || _state$ticker === void 0 ? void 0 : _state$ticker.pause();
|
|
66492
|
+
},
|
|
66493
|
+
resumeAnimation: function resumeAnimation(state) {
|
|
66494
|
+
var _state$ticker2;
|
|
66495
|
+
(_state$ticker2 = state.ticker) === null || _state$ticker2 === void 0 ? void 0 : _state$ticker2.resume();
|
|
66496
|
+
},
|
|
66480
66497
|
_destructor: function _destructor(state) {
|
|
66481
|
-
|
|
66498
|
+
var _state$ticker3;
|
|
66499
|
+
(_state$ticker3 = state.ticker) === null || _state$ticker3 === void 0 ? void 0 : _state$ticker3.dispose();
|
|
66482
66500
|
}
|
|
66483
66501
|
},
|
|
66484
66502
|
init: function init(threeObj, state) {
|
|
@@ -67203,8 +67221,17 @@
|
|
|
67203
67221
|
},
|
|
67204
67222
|
|
|
67205
67223
|
methods: {
|
|
67224
|
+
pauseAnimation: function pauseAnimation(state) {
|
|
67225
|
+
var _state$ticker;
|
|
67226
|
+
(_state$ticker = state.ticker) === null || _state$ticker === void 0 ? void 0 : _state$ticker.pause();
|
|
67227
|
+
},
|
|
67228
|
+
resumeAnimation: function resumeAnimation(state) {
|
|
67229
|
+
var _state$ticker2;
|
|
67230
|
+
(_state$ticker2 = state.ticker) === null || _state$ticker2 === void 0 ? void 0 : _state$ticker2.resume();
|
|
67231
|
+
},
|
|
67206
67232
|
_destructor: function _destructor(state) {
|
|
67207
|
-
|
|
67233
|
+
var _state$ticker3;
|
|
67234
|
+
(_state$ticker3 = state.ticker) === null || _state$ticker3 === void 0 ? void 0 : _state$ticker3.dispose();
|
|
67208
67235
|
}
|
|
67209
67236
|
},
|
|
67210
67237
|
init: function init(threeObj, state) {
|
|
@@ -67679,8 +67706,34 @@
|
|
|
67679
67706
|
return l.isBehindGlobe(isBehindGlobe);
|
|
67680
67707
|
});
|
|
67681
67708
|
},
|
|
67709
|
+
pauseAnimation: function pauseAnimation(state) {
|
|
67710
|
+
if (state.animationFrameRequestId !== null) {
|
|
67711
|
+
cancelAnimationFrame(state.animationFrameRequestId);
|
|
67712
|
+
state.animationFrameRequestId = null;
|
|
67713
|
+
}
|
|
67714
|
+
state.pausableLayers.forEach(function (l) {
|
|
67715
|
+
var _l$pauseAnimation;
|
|
67716
|
+
return (_l$pauseAnimation = l.pauseAnimation) === null || _l$pauseAnimation === void 0 ? void 0 : _l$pauseAnimation.call(l);
|
|
67717
|
+
});
|
|
67718
|
+
return this;
|
|
67719
|
+
},
|
|
67720
|
+
resumeAnimation: function resumeAnimation(state) {
|
|
67721
|
+
if (state.animationFrameRequestId === null) {
|
|
67722
|
+
this._animationCycle();
|
|
67723
|
+
}
|
|
67724
|
+
state.pausableLayers.forEach(function (l) {
|
|
67725
|
+
var _l$resumeAnimation;
|
|
67726
|
+
return (_l$resumeAnimation = l.resumeAnimation) === null || _l$resumeAnimation === void 0 ? void 0 : _l$resumeAnimation.call(l);
|
|
67727
|
+
});
|
|
67728
|
+
return this;
|
|
67729
|
+
},
|
|
67730
|
+
_animationCycle: function _animationCycle(state) {
|
|
67731
|
+
state.animationFrameRequestId = requestAnimationFrame(this._animationCycle);
|
|
67732
|
+
TWEEN$1.update(); // run tween updates
|
|
67733
|
+
},
|
|
67734
|
+
|
|
67682
67735
|
_destructor: function _destructor(state) {
|
|
67683
|
-
|
|
67736
|
+
this.pauseAnimation();
|
|
67684
67737
|
state.destructableLayers.forEach(function (l) {
|
|
67685
67738
|
return l._destructor();
|
|
67686
67739
|
});
|
|
@@ -67708,6 +67761,9 @@
|
|
|
67708
67761
|
}),
|
|
67709
67762
|
destructableLayers: Object.values(layers).filter(function (l) {
|
|
67710
67763
|
return l.hasOwnProperty('_destructor');
|
|
67764
|
+
}),
|
|
67765
|
+
pausableLayers: Object.values(layers).filter(function (l) {
|
|
67766
|
+
return l.hasOwnProperty('pauseAnimation');
|
|
67711
67767
|
})
|
|
67712
67768
|
});
|
|
67713
67769
|
},
|
|
@@ -67756,11 +67812,8 @@
|
|
|
67756
67812
|
};
|
|
67757
67813
|
waitForGlobeReady ? state.globeLayer.onReady(initGlobe) : initGlobe();
|
|
67758
67814
|
|
|
67759
|
-
//
|
|
67760
|
-
(
|
|
67761
|
-
state.animationFrameRequestId = requestAnimationFrame(onFrame);
|
|
67762
|
-
TWEEN$1.update();
|
|
67763
|
-
})(); // IIFE
|
|
67815
|
+
// Kick-off animation cycle
|
|
67816
|
+
this._animationCycle();
|
|
67764
67817
|
},
|
|
67765
67818
|
update: function update(state) {}
|
|
67766
67819
|
});
|
|
@@ -72339,16 +72392,20 @@
|
|
|
72339
72392
|
}, linkedGlobeProps), linkedRenderObjsProps),
|
|
72340
72393
|
methods: _objectSpread2$2(_objectSpread2$2({
|
|
72341
72394
|
pauseAnimation: function pauseAnimation(state) {
|
|
72395
|
+
var _state$globe;
|
|
72342
72396
|
if (state.animationFrameRequestId !== null) {
|
|
72343
72397
|
cancelAnimationFrame(state.animationFrameRequestId);
|
|
72344
72398
|
state.animationFrameRequestId = null;
|
|
72345
72399
|
}
|
|
72400
|
+
(_state$globe = state.globe) === null || _state$globe === void 0 ? void 0 : _state$globe.pauseAnimation();
|
|
72346
72401
|
return this;
|
|
72347
72402
|
},
|
|
72348
72403
|
resumeAnimation: function resumeAnimation(state) {
|
|
72404
|
+
var _state$globe2;
|
|
72349
72405
|
if (state.animationFrameRequestId === null) {
|
|
72350
72406
|
this._animationCycle();
|
|
72351
72407
|
}
|
|
72408
|
+
(_state$globe2 = state.globe) === null || _state$globe2 === void 0 ? void 0 : _state$globe2.resumeAnimation();
|
|
72352
72409
|
return this;
|
|
72353
72410
|
},
|
|
72354
72411
|
_animationCycle: function _animationCycle(state) {
|
|
@@ -72396,11 +72453,11 @@
|
|
|
72396
72453
|
}
|
|
72397
72454
|
},
|
|
72398
72455
|
getScreenCoords: function getScreenCoords(state) {
|
|
72399
|
-
var _state$
|
|
72456
|
+
var _state$globe3;
|
|
72400
72457
|
for (var _len = arguments.length, geoCoords = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
72401
72458
|
geoCoords[_key - 1] = arguments[_key];
|
|
72402
72459
|
}
|
|
72403
|
-
var cartesianCoords = (_state$
|
|
72460
|
+
var cartesianCoords = (_state$globe3 = state.globe).getCoords.apply(_state$globe3, geoCoords);
|
|
72404
72461
|
return state.renderObjs.getScreenCoords(cartesianCoords.x, cartesianCoords.y, cartesianCoords.z);
|
|
72405
72462
|
},
|
|
72406
72463
|
toGlobeCoords: function toGlobeCoords(state, x, y) {
|