three-base 2.0.47 → 2.0.49
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/Transition.js +2 -1
- package/Transition.ts +2 -1
- package/package.json +1 -1
- package/threeUtils.js +2 -2
- package/threeUtils.ts +2 -2
package/Transition.js
CHANGED
|
@@ -138,7 +138,8 @@ export default class Transition {
|
|
|
138
138
|
if (!this._isDone) {
|
|
139
139
|
threeUtils.removeEventListener("requestAnimationFrame", this.runbindThis);
|
|
140
140
|
threeUtils.addEventListener("requestAnimationFrame", this.runbindThis);
|
|
141
|
-
await new Promise(resolve => setTimeout(resolve,
|
|
141
|
+
await new Promise(resolve => setTimeout(resolve, 50));
|
|
142
|
+
await new Promise(resolve => setTimeout(resolve, this._duration));
|
|
142
143
|
}
|
|
143
144
|
return this;
|
|
144
145
|
}
|
package/Transition.ts
CHANGED
|
@@ -190,7 +190,8 @@ export default class Transition {
|
|
|
190
190
|
if (!this._isDone) {
|
|
191
191
|
threeUtils.removeEventListener("requestAnimationFrame", this.runbindThis);
|
|
192
192
|
threeUtils.addEventListener("requestAnimationFrame", this.runbindThis);
|
|
193
|
-
await new Promise(resolve => setTimeout(resolve,
|
|
193
|
+
await new Promise(resolve => setTimeout(resolve, 50));
|
|
194
|
+
await new Promise(resolve => setTimeout(resolve, this._duration));
|
|
194
195
|
}
|
|
195
196
|
|
|
196
197
|
return this;
|
package/package.json
CHANGED
package/threeUtils.js
CHANGED
|
@@ -116,7 +116,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
116
116
|
object3d.computeBoundingBox();
|
|
117
117
|
object3d.boundingBox.getCenter(this._center);
|
|
118
118
|
}
|
|
119
|
-
return this._center;
|
|
119
|
+
return this._center.clone();
|
|
120
120
|
}
|
|
121
121
|
// 获取模型大小
|
|
122
122
|
getSize(object3d) {
|
|
@@ -128,7 +128,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
128
128
|
object3d.computeBoundingBox();
|
|
129
129
|
object3d.boundingBox.getSize(this._size);
|
|
130
130
|
}
|
|
131
|
-
return this._size;
|
|
131
|
+
return this._size.clone();
|
|
132
132
|
}
|
|
133
133
|
// 模型对齐底面
|
|
134
134
|
alignBottom(object3d, y = 0) {
|
package/threeUtils.ts
CHANGED
|
@@ -139,7 +139,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
139
139
|
(object3d as BufferGeometry).boundingBox!.getCenter(this._center);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
return this._center;
|
|
142
|
+
return this._center.clone();
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
// 获取模型大小
|
|
@@ -152,7 +152,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
152
152
|
(object3d as BufferGeometry).boundingBox!.getSize(this._size);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
return this._size;
|
|
155
|
+
return this._size.clone();
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
// 模型对齐底面
|