three-base 2.0.65 → 2.0.66
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/ThreeBase.js +2 -2
- package/ThreeBase.ts +2 -2
- package/package.json +1 -1
package/ThreeBase.js
CHANGED
|
@@ -266,11 +266,11 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
266
266
|
// 设置控制器的位置 以动画的方式移动控制器
|
|
267
267
|
async setLookAt({ position = this.perspectiveCamera.position, center = this.controls.target, duration = 1000 }) {
|
|
268
268
|
// 停止控制器的惯性
|
|
269
|
-
this.controls.enableDamping
|
|
269
|
+
const originEnableDamping = this.controls.enableDamping;
|
|
270
270
|
this.controls.saveState();
|
|
271
271
|
this.controls.update();
|
|
272
272
|
this.controls.reset();
|
|
273
|
-
this.controls.enableDamping =
|
|
273
|
+
this.controls.enableDamping = originEnableDamping;
|
|
274
274
|
let currentPosition = this.perspectiveCamera.position.clone();
|
|
275
275
|
let currentCenter = this.controls.target.clone();
|
|
276
276
|
// 等待动画执行完成
|
package/ThreeBase.ts
CHANGED
|
@@ -323,11 +323,11 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
323
323
|
}: { position: Vector3, center: Vector3, duration?: number }) {
|
|
324
324
|
|
|
325
325
|
// 停止控制器的惯性
|
|
326
|
-
this.controls.enableDamping
|
|
326
|
+
const originEnableDamping = this.controls.enableDamping;
|
|
327
327
|
this.controls.saveState();
|
|
328
328
|
this.controls.update();
|
|
329
329
|
this.controls.reset();
|
|
330
|
-
this.controls.enableDamping =
|
|
330
|
+
this.controls.enableDamping = originEnableDamping;
|
|
331
331
|
|
|
332
332
|
let currentPosition = this.perspectiveCamera.position.clone();
|
|
333
333
|
let currentCenter = this.controls.target.clone();
|