From 962ccbd856bd11d3ce9079e715db2b4e114e8bd9 Mon Sep 17 00:00:00 2001 From: liteng <930372551@qq.com> Date: Wed, 5 Feb 2020 20:22:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=90=E5=88=B6=E6=9C=80=E5=B0=8F=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E9=80=9F=E5=BA=A6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ShadowEditor.Web/src/controls/FreeControls.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ShadowEditor.Web/src/controls/FreeControls.js b/ShadowEditor.Web/src/controls/FreeControls.js index 0120d341..d7ce9947 100644 --- a/ShadowEditor.Web/src/controls/FreeControls.js +++ b/ShadowEditor.Web/src/controls/FreeControls.js @@ -29,6 +29,8 @@ class FreeControls extends BaseControls { this.isPanning = false; // 是否正在移动 this.isRotating = false; // 是否正在旋转 this.velocity = new THREE.Vector3(); // 速度:m/s + this.minVelocity = 1; + this.maxVelocity = 10; this.angularVelocity = new THREE.Euler(); // 角速度:rad/s this.acceleration = 50; // 加速度:m/s^2 this.angularAcceleration = 0.01; // 角加速度:rad/s^2 @@ -80,7 +82,6 @@ class FreeControls extends BaseControls { this.isPanning = true; let distance = cameraPosition.distanceTo(pickPosition); - distance = 0.1; this.velocity.subVectors(cameraPosition, pickPosition) .multiplyScalar(this.zoomSpeed * delta * distance); }