three-base 1.0.25 → 1.0.26
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/lib/ThreeBase.ts +1 -4
- package/lib/Transition.ts +1 -3
- package/lib/threeUtils.ts +2 -2
- package/package.json +1 -1
package/lib/ThreeBase.ts
CHANGED
|
@@ -214,10 +214,7 @@ export default class ThreeBase extends EventDispatcher {
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
// 等待动画执行完成
|
|
217
|
-
|
|
218
|
-
await new Promise(resolve => setTimeout(resolve, 100));
|
|
219
|
-
}
|
|
220
|
-
|
|
217
|
+
await new Promise(resolve => setTimeout(resolve, Math.max(this.controlsCenter._duration, this.controlsPosition._duration)));
|
|
221
218
|
}
|
|
222
219
|
|
|
223
220
|
// 获取控制的位置和朝向 保留3位小数
|
package/lib/Transition.ts
CHANGED
|
@@ -186,9 +186,7 @@ export default class Transition {
|
|
|
186
186
|
}
|
|
187
187
|
threeUtils.addEventListener("requestAnimationFrame", this.runbindThis);
|
|
188
188
|
|
|
189
|
-
|
|
190
|
-
await new Promise(resolve => setTimeout(resolve, 50));
|
|
191
|
-
}
|
|
189
|
+
await new Promise(resolve => setTimeout(resolve, this._duration));
|
|
192
190
|
|
|
193
191
|
return this;
|
|
194
192
|
}
|
package/lib/threeUtils.ts
CHANGED
|
@@ -52,7 +52,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
52
52
|
this.box3.getSize(this.size);
|
|
53
53
|
} else if (object3d instanceof BufferGeometry) {
|
|
54
54
|
object3d.computeBoundingBox();
|
|
55
|
-
object3d.boundingBox
|
|
55
|
+
object3d.boundingBox!.getSize(this.size);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
return this.size;
|
|
@@ -70,7 +70,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
70
70
|
object3d.updateMatrixWorld(true);
|
|
71
71
|
} else if (object3d instanceof BufferGeometry) {
|
|
72
72
|
object3d.computeBoundingBox();
|
|
73
|
-
object3d.translate(0, -object3d.boundingBox
|
|
73
|
+
object3d.translate(0, -object3d.boundingBox!.min.y, 0);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|