globe.gl 2.35.0 → 2.36.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.mjs CHANGED
@@ -515,18 +515,21 @@ var globe = Kapsule({
515
515
  var globeR = state.globe.getGlobeRadius();
516
516
  var controls = state.renderObjs.controls();
517
517
  state.renderObjs.camera().near = 0.05; // less will start causing depth z-fighting issues
518
- controls.minDistance = globeR * (1 + Math.max(1e-5, state.renderObjs.camera().near * 0.012)); // just above the surface, as much as camera near plane permits
518
+ controls.minDistance = globeR + Math.max(0.001, state.renderObjs.camera().near * 1.1); // just above the surface, as much as camera near plane permits
519
519
  controls.maxDistance = globeR * 100;
520
520
  controls.enablePan = false;
521
521
  controls.enableDamping = true;
522
522
  controls.dampingFactor = 0.1;
523
523
  controls.rotateSpeed = 0.3;
524
524
  controls.zoomSpeed = 0.3;
525
+ controls.zoomToCursor = true;
525
526
  controls.addEventListener('change', function () {
527
+ controls.target.setScalar(0); // Keep orbit target on center
528
+
526
529
  // adjust controls speed based on altitude
527
530
  var pov = _this.pointOfView();
528
531
  controls.rotateSpeed = pov.altitude * 0.3;
529
- controls.zoomSpeed = Math.sqrt(pov.altitude) * 0.4;
532
+ controls.zoomSpeed = Math.sqrt(pov.altitude) * 0.5;
530
533
 
531
534
  // Update three-globe pov when camera moves, for proper hiding of elements
532
535
  state.globe.setPointOfView(state.renderObjs.camera());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "globe.gl",
3
- "version": "2.35.0",
3
+ "version": "2.36.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",