globe.gl 2.45.2 → 2.46.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/dist/globe.gl.js CHANGED
@@ -1,4 +1,4 @@
1
- // Version 2.45.2 globe.gl - https://github.com/vasturiano/globe.gl
1
+ // Version 2.46.0 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) :
@@ -38099,138 +38099,6 @@
38099
38099
 
38100
38100
  }
38101
38101
 
38102
- /**
38103
- * Class for keeping track of time.
38104
- *
38105
- * @deprecated since r183.
38106
- */
38107
- class Clock {
38108
-
38109
- /**
38110
- * Constructs a new clock.
38111
- *
38112
- * @deprecated since 183.
38113
- * @param {boolean} [autoStart=true] - Whether to automatically start the clock when
38114
- * `getDelta()` is called for the first time.
38115
- */
38116
- constructor( autoStart = true ) {
38117
-
38118
- /**
38119
- * If set to `true`, the clock starts automatically when `getDelta()` is called
38120
- * for the first time.
38121
- *
38122
- * @type {boolean}
38123
- * @default true
38124
- */
38125
- this.autoStart = autoStart;
38126
-
38127
- /**
38128
- * Holds the time at which the clock's `start()` method was last called.
38129
- *
38130
- * @type {number}
38131
- * @default 0
38132
- */
38133
- this.startTime = 0;
38134
-
38135
- /**
38136
- * Holds the time at which the clock's `start()`, `getElapsedTime()` or
38137
- * `getDelta()` methods were last called.
38138
- *
38139
- * @type {number}
38140
- * @default 0
38141
- */
38142
- this.oldTime = 0;
38143
-
38144
- /**
38145
- * Keeps track of the total time that the clock has been running.
38146
- *
38147
- * @type {number}
38148
- * @default 0
38149
- */
38150
- this.elapsedTime = 0;
38151
-
38152
- /**
38153
- * Whether the clock is running or not.
38154
- *
38155
- * @type {boolean}
38156
- * @default true
38157
- */
38158
- this.running = false;
38159
-
38160
- warn( 'THREE.Clock: This module has been deprecated. Please use THREE.Timer instead.' ); // @deprecated, r183
38161
-
38162
- }
38163
-
38164
- /**
38165
- * Starts the clock. When `autoStart` is set to `true`, the method is automatically
38166
- * called by the class.
38167
- */
38168
- start() {
38169
-
38170
- this.startTime = performance.now();
38171
-
38172
- this.oldTime = this.startTime;
38173
- this.elapsedTime = 0;
38174
- this.running = true;
38175
-
38176
- }
38177
-
38178
- /**
38179
- * Stops the clock.
38180
- */
38181
- stop() {
38182
-
38183
- this.getElapsedTime();
38184
- this.running = false;
38185
- this.autoStart = false;
38186
-
38187
- }
38188
-
38189
- /**
38190
- * Returns the elapsed time in seconds.
38191
- *
38192
- * @return {number} The elapsed time.
38193
- */
38194
- getElapsedTime() {
38195
-
38196
- this.getDelta();
38197
- return this.elapsedTime;
38198
-
38199
- }
38200
-
38201
- /**
38202
- * Returns the delta time in seconds.
38203
- *
38204
- * @return {number} The delta time.
38205
- */
38206
- getDelta() {
38207
-
38208
- let diff = 0;
38209
-
38210
- if ( this.autoStart && ! this.running ) {
38211
-
38212
- this.start();
38213
- return 0;
38214
-
38215
- }
38216
-
38217
- if ( this.running ) {
38218
-
38219
- const newTime = performance.now();
38220
-
38221
- diff = ( newTime - this.oldTime ) / 1000;
38222
- this.oldTime = newTime;
38223
-
38224
- this.elapsedTime += diff;
38225
-
38226
- }
38227
-
38228
- return diff;
38229
-
38230
- }
38231
-
38232
- }
38233
-
38234
38102
  /**
38235
38103
  * This class can be used to represent points in 3D space as
38236
38104
  * [Spherical coordinates](https://en.wikipedia.org/wiki/Spherical_coordinate_system).
@@ -65103,9 +64971,9 @@ void main() {
65103
64971
  }
65104
64972
  }
65105
64973
 
65106
- var _materialDispose$1 = function materialDispose(material) {
64974
+ var _materialDispose$2 = function materialDispose(material) {
65107
64975
  if (material instanceof Array) {
65108
- material.forEach(_materialDispose$1);
64976
+ material.forEach(_materialDispose$2);
65109
64977
  } else {
65110
64978
  if (material.map) {
65111
64979
  material.map.dispose();
@@ -65113,18 +64981,18 @@ void main() {
65113
64981
  material.dispose();
65114
64982
  }
65115
64983
  };
65116
- var _deallocate$1 = function deallocate(obj) {
64984
+ var _deallocate$2 = function deallocate(obj) {
65117
64985
  if (obj.geometry) {
65118
64986
  obj.geometry.dispose();
65119
64987
  }
65120
64988
  if (obj.material) {
65121
- _materialDispose$1(obj.material);
64989
+ _materialDispose$2(obj.material);
65122
64990
  }
65123
64991
  if (obj.texture) {
65124
64992
  obj.texture.dispose();
65125
64993
  }
65126
64994
  if (obj.children) {
65127
- obj.children.forEach(_deallocate$1);
64995
+ obj.children.forEach(_deallocate$2);
65128
64996
  }
65129
64997
  };
65130
64998
 
@@ -65277,7 +65145,7 @@ void main() {
65277
65145
  l.forEach(function (d) {
65278
65146
  if (d.obj) {
65279
65147
  _this.remove(d.obj);
65280
- _deallocate$1(d.obj);
65148
+ _deallocate$2(d.obj);
65281
65149
  delete d.obj;
65282
65150
  }
65283
65151
  });
@@ -65345,7 +65213,7 @@ void main() {
65345
65213
  _classPrivateFieldGet2$2(_tilesMeta, this)[l] && _classPrivateFieldGet2$2(_tilesMeta, this)[l].forEach(function (d) {
65346
65214
  if (d.obj) {
65347
65215
  _this2.remove(d.obj);
65348
- _deallocate$1(d.obj);
65216
+ _deallocate$2(d.obj);
65349
65217
  delete d.obj;
65350
65218
  }
65351
65219
  });
@@ -169549,9 +169417,9 @@ var<${access}> ${ name } : ${ structName };`;
169549
169417
  }
169550
169418
  }
169551
169419
 
169552
- var _materialDispose = function materialDispose(material) {
169420
+ var _materialDispose$1 = function materialDispose(material) {
169553
169421
  if (material instanceof Array) {
169554
- material.forEach(_materialDispose);
169422
+ material.forEach(_materialDispose$1);
169555
169423
  } else {
169556
169424
  if (material.map) {
169557
169425
  material.map.dispose();
@@ -169559,25 +169427,25 @@ var<${access}> ${ name } : ${ structName };`;
169559
169427
  material.dispose();
169560
169428
  }
169561
169429
  };
169562
- var _deallocate = function deallocate(obj) {
169430
+ var _deallocate$1 = function deallocate(obj) {
169563
169431
  if (obj.geometry) {
169564
169432
  obj.geometry.dispose();
169565
169433
  }
169566
169434
  if (obj.material) {
169567
- _materialDispose(obj.material);
169435
+ _materialDispose$1(obj.material);
169568
169436
  }
169569
169437
  if (obj.texture) {
169570
169438
  obj.texture.dispose();
169571
169439
  }
169572
169440
  if (obj.children) {
169573
- obj.children.forEach(_deallocate);
169441
+ obj.children.forEach(_deallocate$1);
169574
169442
  }
169575
169443
  };
169576
- var emptyObject = function emptyObject(obj) {
169444
+ var emptyObject$1 = function emptyObject(obj) {
169577
169445
  if (obj && obj.children) while (obj.children.length) {
169578
169446
  var childObj = obj.children[0];
169579
169447
  obj.remove(childObj);
169580
- _deallocate(childObj);
169448
+ _deallocate$1(childObj);
169581
169449
  }
169582
169450
  };
169583
169451
 
@@ -169805,9 +169673,9 @@ var<${access}> ${ name } : ${ structName };`;
169805
169673
  state.tileEngine.clearTiles();
169806
169674
  },
169807
169675
  _destructor: function _destructor(state) {
169808
- _deallocate(state.globeObj);
169809
- _deallocate(state.tileEngine);
169810
- _deallocate(state.graticulesObj);
169676
+ _deallocate$1(state.globeObj);
169677
+ _deallocate$1(state.tileEngine);
169678
+ _deallocate$1(state.graticulesObj);
169811
169679
  }
169812
169680
  },
169813
169681
  stateInit: function stateInit() {
@@ -169843,7 +169711,7 @@ var<${access}> ${ name } : ${ structName };`;
169843
169711
  },
169844
169712
  init: function init(threeObj, state) {
169845
169713
  // Clear the scene
169846
- emptyObject(threeObj);
169714
+ emptyObject$1(threeObj);
169847
169715
 
169848
169716
  // Main three object to manipulate
169849
169717
  state.scene = threeObj;
@@ -169899,7 +169767,7 @@ var<${access}> ${ name } : ${ structName };`;
169899
169767
  if (state.atmosphereObj) {
169900
169768
  // recycle previous atmosphere object
169901
169769
  state.scene.remove(state.atmosphereObj);
169902
- _deallocate(state.atmosphereObj);
169770
+ _deallocate$1(state.atmosphereObj);
169903
169771
  }
169904
169772
  if (state.atmosphereColor && state.atmosphereAltitude) {
169905
169773
  var obj = state.atmosphereObj = new GlowMesh(state.globeObj.geometry, {
@@ -170034,7 +169902,7 @@ var<${access}> ${ name } : ${ structName };`;
170034
169902
  fn(obj, dId);
170035
169903
  var removeFn = function removeFn() {
170036
169904
  _this3.scene.remove(obj);
170037
- _deallocate(obj);
169905
+ _deallocate$1(obj);
170038
169906
  delete d[_classPrivateFieldGet2(_objBindAttr, _this3)];
170039
169907
  };
170040
169908
  _classPrivateFieldGet2(_removeDelay, _this3) ? setTimeout(removeFn, _classPrivateFieldGet2(_removeDelay, _this3)) : removeFn();
@@ -170100,7 +169968,7 @@ var<${access}> ${ name } : ${ structName };`;
170100
169968
  init: function init(threeObj, state, _ref) {
170101
169969
  var tweenGroup = _ref.tweenGroup;
170102
169970
  // Clear the scene
170103
- emptyObject(threeObj);
169971
+ emptyObject$1(threeObj);
170104
169972
 
170105
169973
  // Main three object to manipulate
170106
169974
  state.scene = threeObj;
@@ -170125,7 +169993,7 @@ var<${access}> ${ name } : ${ structName };`;
170125
169993
  var pointMaterials = {}; // indexed by color
170126
169994
 
170127
169995
  if (!state.pointsMerge && changedProps.hasOwnProperty('pointsMerge')) {
170128
- emptyObject(state.scene); // Empty trailing merged objects
169996
+ emptyObject$1(state.scene); // Empty trailing merged objects
170129
169997
  }
170130
169998
  state.dataMapper.scene = state.pointsMerge ? new THREE$f.Object3D() : state.scene; // use fake scene if merging points
170131
169999
 
@@ -170154,7 +170022,7 @@ var<${access}> ${ name } : ${ structName };`;
170154
170022
  points.__data = state.pointsData; // Attach obj data
170155
170023
 
170156
170024
  state.dataMapper.clear(); // Unbind merged points
170157
- emptyObject(state.scene);
170025
+ emptyObject$1(state.scene);
170158
170026
  state.scene.add(points);
170159
170027
  }
170160
170028
 
@@ -170397,7 +170265,7 @@ var<${access}> ${ name } : ${ structName };`;
170397
170265
  },
170398
170266
  init: function init(threeObj, state) {
170399
170267
  // Clear the scene
170400
- emptyObject(threeObj);
170268
+ emptyObject$1(threeObj);
170401
170269
 
170402
170270
  // Main three object to manipulate
170403
170271
  state.scene = threeObj;
@@ -170447,7 +170315,7 @@ var<${access}> ${ name } : ${ structName };`;
170447
170315
  var useTube = stroke !== null && stroke !== undefined;
170448
170316
  if (!group.children.length || useTube !== (group.children[0].type === 'Mesh')) {
170449
170317
  // create or swap object types
170450
- emptyObject(group);
170318
+ emptyObject$1(group);
170451
170319
  var _obj = useTube ? new THREE$e.Mesh() : new THREE$e.Line(new THREE$e.BufferGeometry());
170452
170320
  _obj.material = state.sharedMaterial.clone(); // Separate material instance per object to have dedicated uniforms (but shared shaders)
170453
170321
 
@@ -170713,7 +170581,7 @@ var<${access}> ${ name } : ${ structName };`;
170713
170581
  init: function init(threeObj, state, _ref2) {
170714
170582
  var tweenGroup = _ref2.tweenGroup;
170715
170583
  // Clear the scene
170716
- emptyObject(threeObj);
170584
+ emptyObject$1(threeObj);
170717
170585
 
170718
170586
  // Main three object to manipulate
170719
170587
  state.scene = threeObj;
@@ -170751,7 +170619,7 @@ var<${access}> ${ name } : ${ structName };`;
170751
170619
  var hexMaterials = {}; // indexed by color
170752
170620
 
170753
170621
  if (!state.hexBinMerge && changedProps.hasOwnProperty('hexBinMerge')) {
170754
- emptyObject(state.scene); // Empty trailing merged objects
170622
+ emptyObject$1(state.scene); // Empty trailing merged objects
170755
170623
  }
170756
170624
  state.dataMapper.scene = state.hexBinMerge ? new THREE$d.Object3D() : state.scene; // use fake scene if merging hex points
170757
170625
 
@@ -170794,7 +170662,7 @@ var<${access}> ${ name } : ${ structName };`;
170794
170662
  hexPoints.__data = hexBins; // Attach obj data
170795
170663
 
170796
170664
  state.dataMapper.clear(); // Unbind merged points
170797
- emptyObject(state.scene);
170665
+ emptyObject$1(state.scene);
170798
170666
  state.scene.add(hexPoints);
170799
170667
  }
170800
170668
 
@@ -171174,7 +171042,7 @@ var<${access}> ${ name } : ${ structName };`;
171174
171042
  init: function init(threeObj, state, _ref) {
171175
171043
  var tweenGroup = _ref.tweenGroup;
171176
171044
  // Clear the scene
171177
- emptyObject(threeObj);
171045
+ emptyObject$1(threeObj);
171178
171046
 
171179
171047
  // Main three object to manipulate
171180
171048
  state.scene = threeObj;
@@ -171365,7 +171233,7 @@ var<${access}> ${ name } : ${ structName };`;
171365
171233
  init: function init(threeObj, state, _ref) {
171366
171234
  var tweenGroup = _ref.tweenGroup;
171367
171235
  // Clear the scene
171368
- emptyObject(threeObj);
171236
+ emptyObject$1(threeObj);
171369
171237
 
171370
171238
  // Main three object to manipulate
171371
171239
  state.scene = threeObj;
@@ -171607,7 +171475,7 @@ var<${access}> ${ name } : ${ structName };`;
171607
171475
  init: function init(threeObj, state, _ref) {
171608
171476
  var tweenGroup = _ref.tweenGroup;
171609
171477
  // Clear the scene
171610
- emptyObject(threeObj);
171478
+ emptyObject$1(threeObj);
171611
171479
 
171612
171480
  // Main three object to manipulate
171613
171481
  state.scene = threeObj;
@@ -171882,7 +171750,7 @@ var<${access}> ${ name } : ${ structName };`;
171882
171750
  },
171883
171751
  init: function init(threeObj, state) {
171884
171752
  // Clear the scene
171885
- emptyObject(threeObj);
171753
+ emptyObject$1(threeObj);
171886
171754
 
171887
171755
  // Main three object to manipulate
171888
171756
  state.scene = threeObj;
@@ -171936,7 +171804,7 @@ var<${access}> ${ name } : ${ structName };`;
171936
171804
  var useFatLine = stroke !== null && stroke !== undefined;
171937
171805
  if (!group.children.length || useFatLine === (group.children[0].type === 'Line')) {
171938
171806
  // create or swap object types
171939
- emptyObject(group);
171807
+ emptyObject$1(group);
171940
171808
  var _obj = useFatLine ? new Line2(new LineGeometry(), new LineMaterial()) : new THREE$8.Line(new THREE$8.BufferGeometry(), state.sharedMaterial.clone() // Separate material instance per object to have dedicated uniforms (but shared shaders)
171941
171809
  );
171942
171810
  group.add(_obj);
@@ -172237,7 +172105,7 @@ var<${access}> ${ name } : ${ structName };`;
172237
172105
  init: function init(threeObj, state, _ref) {
172238
172106
  var tweenGroup = _ref.tweenGroup;
172239
172107
  // Clear the scene
172240
- emptyObject(threeObj);
172108
+ emptyObject$1(threeObj);
172241
172109
 
172242
172110
  // Main three object to manipulate
172243
172111
  state.scene = threeObj;
@@ -172361,7 +172229,7 @@ var<${access}> ${ name } : ${ structName };`;
172361
172229
  },
172362
172230
  init: function init(threeObj, state) {
172363
172231
  // Clear the scene
172364
- emptyObject(threeObj);
172232
+ emptyObject$1(threeObj);
172365
172233
 
172366
172234
  // Main three object to manipulate
172367
172235
  state.scene = threeObj;
@@ -172518,7 +172386,7 @@ var<${access}> ${ name } : ${ structName };`;
172518
172386
  init: function init(threeObj, state, _ref) {
172519
172387
  var tweenGroup = _ref.tweenGroup;
172520
172388
  // Clear the scene
172521
- emptyObject(threeObj);
172389
+ emptyObject$1(threeObj);
172522
172390
 
172523
172391
  // Main three object to manipulate
172524
172392
  state.scene = threeObj;
@@ -172607,7 +172475,7 @@ var<${access}> ${ name } : ${ structName };`;
172607
172475
  }).onComplete(function () {
172608
172476
  state.tweenGroup.remove(this);
172609
172477
  obj.remove(circleObj);
172610
- _deallocate(circleObj);
172478
+ _deallocate$1(circleObj);
172611
172479
  }).start());
172612
172480
  }
172613
172481
  }
@@ -172714,7 +172582,7 @@ var<${access}> ${ name } : ${ structName };`;
172714
172582
  init: function init(threeObj, state, _ref) {
172715
172583
  var tweenGroup = _ref.tweenGroup;
172716
172584
  // Clear the scene
172717
- emptyObject(threeObj);
172585
+ emptyObject$1(threeObj);
172718
172586
 
172719
172587
  // Main three object to manipulate
172720
172588
  state.scene = threeObj;
@@ -172923,7 +172791,7 @@ var<${access}> ${ name } : ${ structName };`;
172923
172791
  init: function init(threeObj, state, _ref3) {
172924
172792
  var tweenGroup = _ref3.tweenGroup;
172925
172793
  // Clear the scene
172926
- emptyObject(threeObj);
172794
+ emptyObject$1(threeObj);
172927
172795
 
172928
172796
  // Main three object to manipulate
172929
172797
  state.scene = threeObj;
@@ -173015,7 +172883,7 @@ var<${access}> ${ name } : ${ structName };`;
173015
172883
  },
173016
172884
  init: function init(threeObj, state) {
173017
172885
  // Clear the scene
173018
- emptyObject(threeObj);
172886
+ emptyObject$1(threeObj);
173019
172887
 
173020
172888
  // Main three object to manipulate
173021
172889
  state.scene = threeObj;
@@ -173071,7 +172939,7 @@ var<${access}> ${ name } : ${ structName };`;
173071
172939
  },
173072
172940
  init: function init(threeObj, state) {
173073
172941
  // Clear the scene
173074
- emptyObject(threeObj);
172942
+ emptyObject$1(threeObj);
173075
172943
 
173076
172944
  // Main three object to manipulate
173077
172945
  state.scene = threeObj;
@@ -173091,7 +172959,7 @@ var<${access}> ${ name } : ${ structName };`;
173091
172959
  },
173092
172960
  update: function update(state, changedProps) {
173093
172961
  if (!state.customThreeObjectUpdate) {
173094
- emptyObject(state.scene);
172962
+ emptyObject$1(state.scene);
173095
172963
  } // Clear the existing objects to create all new, if there's no update method (brute-force)
173096
172964
 
173097
172965
  var customObjectUpdateAccessor = index$2(state.customThreeObjectUpdate);
@@ -173321,7 +173189,7 @@ var<${access}> ${ name } : ${ structName };`;
173321
173189
  _ref15$waitForGlobeRe = _ref15.waitForGlobeReady,
173322
173190
  waitForGlobeReady = _ref15$waitForGlobeRe === void 0 ? true : _ref15$waitForGlobeRe;
173323
173191
  // Clear the scene
173324
- emptyObject(threeObj);
173192
+ emptyObject$1(threeObj);
173325
173193
 
173326
173194
  // Main three object to manipulate
173327
173195
  state.scene = threeObj;
@@ -180402,6 +180270,38 @@ var<${access}> ${ name } : ${ structName };`;
180402
180270
  }
180403
180271
  }
180404
180272
 
180273
+ var _materialDispose = function materialDispose(material) {
180274
+ if (material instanceof Array) {
180275
+ material.forEach(_materialDispose);
180276
+ } else {
180277
+ if (material.map) {
180278
+ material.map.dispose();
180279
+ }
180280
+ material.dispose();
180281
+ }
180282
+ };
180283
+ var _deallocate = function deallocate(obj) {
180284
+ if (obj.geometry) {
180285
+ obj.geometry.dispose();
180286
+ }
180287
+ if (obj.material) {
180288
+ _materialDispose(obj.material);
180289
+ }
180290
+ if (obj.texture) {
180291
+ obj.texture.dispose();
180292
+ }
180293
+ if (obj.children) {
180294
+ obj.children.forEach(_deallocate);
180295
+ }
180296
+ };
180297
+ var emptyObject = function emptyObject(obj) {
180298
+ while (obj.children.length) {
180299
+ var childObj = obj.children[0];
180300
+ obj.remove(childObj);
180301
+ _deallocate(childObj);
180302
+ }
180303
+ };
180304
+
180405
180305
  var three = window.THREE ? window.THREE // Prefer consumption from global THREE, if exists
180406
180306
  : {
180407
180307
  WebGLRenderer: WebGLRenderer,
@@ -180418,7 +180318,7 @@ var<${access}> ${ name } : ${ structName };`;
180418
180318
  SphereGeometry: SphereGeometry,
180419
180319
  MeshBasicMaterial: MeshBasicMaterial,
180420
180320
  BackSide: BackSide,
180421
- Clock: Clock
180321
+ Timer: Timer
180422
180322
  };
180423
180323
  var threeRenderObjects = index$3({
180424
180324
  props: {
@@ -180512,7 +180412,7 @@ var<${access}> ${ name } : ${ structName };`;
180512
180412
  methods: {
180513
180413
  tick: function tick(state) {
180514
180414
  if (state.initialised) {
180515
- state.controls.enabled && state.controls.update && state.controls.update(Math.min(1, state.clock.getDelta())); // timedelta is required for fly controls
180415
+ state.controls.enabled && state.controls.update && state.controls.update(Math.min(1, state.timer.update().getDelta())); // timedelta is required for fly controls
180516
180416
 
180517
180417
  state.postProcessingComposer ? state.postProcessingComposer.render() // if using postprocessing, switch the output to it
180518
180418
  : state.renderer.render(state.scene, state.camera);
@@ -180705,13 +180605,21 @@ var<${access}> ${ name } : ${ structName };`;
180705
180605
  },
180706
180606
  tbControls: function tbControls(state) {
180707
180607
  return state.controls;
180708
- } // to be deprecated
180608
+ },
180609
+ // to be deprecated
180610
+ _destructor: function _destructor(state) {
180611
+ var _state$controls, _state$renderer, _state$postProcessing;
180612
+ emptyObject(state.scene);
180613
+ (_state$controls = state.controls) === null || _state$controls === void 0 || _state$controls.dispose();
180614
+ (_state$renderer = state.renderer) === null || _state$renderer === void 0 || _state$renderer.dispose();
180615
+ (_state$postProcessing = state.postProcessingComposer) === null || _state$postProcessing === void 0 || _state$postProcessing.dispose();
180616
+ }
180709
180617
  },
180710
180618
  stateInit: function stateInit() {
180711
180619
  return {
180712
180620
  scene: new three.Scene(),
180713
180621
  camera: new three.PerspectiveCamera(),
180714
- clock: new three.Clock(),
180622
+ timer: new three.Timer(),
180715
180623
  tweenGroup: new Group(),
180716
180624
  lastRaycasterCheck: 0
180717
180625
  };
@@ -181248,6 +181156,11 @@ var<${access}> ${ name } : ${ structName };`;
181248
181156
  return finalGeoCoords[p] = +finalGeoCoords[p];
181249
181157
  }); // coerce coords to number
181250
181158
 
181159
+ if (state.povTween) {
181160
+ // cancel any ongoing pov animation
181161
+ state.povTween.end();
181162
+ state.povTween = undefined;
181163
+ }
181251
181164
  if (!transitionDuration) {
181252
181165
  // no animation
181253
181166
  setCameraPos(finalGeoCoords);
@@ -181255,7 +181168,8 @@ var<${access}> ${ name } : ${ structName };`;
181255
181168
  // Avoid rotating more than 180deg longitude
181256
181169
  while (curGeoCoords.lng - finalGeoCoords.lng > 180) curGeoCoords.lng -= 360;
181257
181170
  while (curGeoCoords.lng - finalGeoCoords.lng < -180) curGeoCoords.lng += 360;
181258
- state.tweenGroup.add(new Tween(curGeoCoords).to(finalGeoCoords, transitionDuration).easing(Easing.Cubic.InOut).onUpdate(setCameraPos).onComplete(function () {
181171
+ state.tweenGroup.add(state.povTween = new Tween(curGeoCoords).to(finalGeoCoords, transitionDuration).easing(Easing.Cubic.InOut).onUpdate(setCameraPos).onComplete(function () {
181172
+ state.povTween = undefined;
181259
181173
  state.tweenGroup.remove(this);
181260
181174
  }).start());
181261
181175
  }
@@ -181314,7 +181228,6 @@ var<${access}> ${ name } : ${ structName };`;
181314
181228
  },
181315
181229
  // Expose controls
181316
181230
  _destructor: function _destructor(state) {
181317
- state.globe._destructor();
181318
181231
  this.pauseAnimation();
181319
181232
  this.pointsData([]);
181320
181233
  this.arcsData([]);
@@ -181329,6 +181242,8 @@ var<${access}> ${ name } : ${ structName };`;
181329
181242
  this.htmlElementsData([]);
181330
181243
  this.objectsData([]);
181331
181244
  this.customLayerData([]);
181245
+ state.globe._destructor();
181246
+ state.renderObjs._destructor();
181332
181247
  }
181333
181248
  }, linkedGlobeMethods), linkedRenderObjsMethods),
181334
181249
  stateInit: function stateInit(_ref6) {