three-base 1.0.15 → 1.0.16
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/Transition.ts +7 -1
- package/package.json +1 -1
package/lib/Transition.ts
CHANGED
|
@@ -92,6 +92,7 @@ export default class Transition {
|
|
|
92
92
|
} else {
|
|
93
93
|
this.onChangeCall(this.getJson());
|
|
94
94
|
}
|
|
95
|
+
return this;
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
runbindThis = this.run.bind(this);
|
|
@@ -144,7 +145,7 @@ export default class Transition {
|
|
|
144
145
|
return 0;
|
|
145
146
|
}
|
|
146
147
|
|
|
147
|
-
set(param: TParam): this {
|
|
148
|
+
async set(param: TParam): Promise<this> {
|
|
148
149
|
|
|
149
150
|
let timetemp = performance.now() + this._delay;;
|
|
150
151
|
|
|
@@ -184,6 +185,11 @@ export default class Transition {
|
|
|
184
185
|
|
|
185
186
|
}
|
|
186
187
|
threeUtils.addEventListener("requestAnimationFrame", this.runbindThis);
|
|
188
|
+
|
|
189
|
+
while (!this._isDone) {
|
|
190
|
+
await new Promise(resolve => setTimeout(resolve, 50));
|
|
191
|
+
}
|
|
192
|
+
|
|
187
193
|
return this;
|
|
188
194
|
}
|
|
189
195
|
// 重置起始和终止位置
|