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