平移速度

This commit is contained in:
2025-09-04 17:26:24 +08:00
parent 0f964b3a92
commit 3ac1d5f49c

View File

@@ -425,8 +425,8 @@ export default {
if (Math.abs(deltaX) < 1 && Math.abs(deltaY) < 1) return;
// 移动相机(反转方向以获得自然拖动效果)
this.cameraX -= deltaX * 0.3 / this.cameraZoom;
this.cameraY += deltaY * 0.3 / this.cameraZoom;
this.cameraX -= deltaX * 0.05 / this.cameraZoom;
this.cameraY += deltaY * 0.05 / this.cameraZoom;
this.previousTouchX = e.touches[0].clientX;
this.previousTouchY = e.touches[0].clientY;
@@ -486,8 +486,8 @@ export default {
if (Math.abs(deltaX) < 1 && Math.abs(deltaY) < 1) return;
this.cameraX -= deltaX * 0.3 / this.cameraZoom;
this.cameraY += deltaY * 0.3 / this.cameraZoom;
this.cameraX -= deltaX * 0.05 / this.cameraZoom;
this.cameraY += deltaY * 0.05 / this.cameraZoom;
this.previousTouchX = e.clientX;
this.previousTouchY = e.clientY;