@d5techs/3dgs-lib 1.4.44 → 1.4.45

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/3dgs-lib.js CHANGED
@@ -737,7 +737,7 @@ const _OrbitControls = class _OrbitControls {
737
737
  */
738
738
  panByScreenDelta(deltaX, deltaY) {
739
739
  const { right, up } = this.getCameraAxes();
740
- const scale = this.panSpeed * this.distance;
740
+ const scale = this.panSpeed * this.getEffectiveZoomDist();
741
741
  const dx = -deltaX * scale;
742
742
  const dy = deltaY * scale;
743
743
  if (this.enableDamping) {
@@ -825,7 +825,7 @@ const _OrbitControls = class _OrbitControls {
825
825
  const m = this.camera.viewMatrix;
826
826
  const right = [m[0], m[4], m[8]];
827
827
  const forward = [-m[2], -m[6], -m[10]];
828
- const speed = this.moveSpeed * this.distance;
828
+ const speed = this.moveSpeed * this.getEffectiveZoomDist();
829
829
  let dx = 0, dy = 0, dz = 0;
830
830
  if (this.pressedKeys.has("w") || this.pressedKeys.has("arrowup")) {
831
831
  dx += forward[0] * speed;
@@ -960,7 +960,7 @@ const _OrbitControls = class _OrbitControls {
960
960
  const deltaX = currentCenter.x - this.lastTouchCenter.x;
961
961
  const deltaY = currentCenter.y - this.lastTouchCenter.y;
962
962
  const { right, up } = this.getCameraAxes();
963
- const scale = this.touchPanSpeed * this.distance;
963
+ const scale = this.touchPanSpeed * this.getEffectiveZoomDist();
964
964
  const dx = -deltaX * scale;
965
965
  const dy = deltaY * scale;
966
966
  if (this.enableDamping) {