Optmi behavior list style

This commit is contained in:
2022-03-31 21:57:08 +08:00
parent 8dcbfbefb0
commit 14dbd944f9
3 changed files with 17 additions and 14 deletions
+7 -7
View File
@@ -69,13 +69,13 @@ class Actuator extends Emitter<IActuatorEvent> {
// 丢帧判定
if (durTime > 0.1) {
console.log("Actuator: Ticker dur time error. dropping...")
}
this.alignTimer += durTime;
if (this.alignTimer > (1 / this.fps)) {
this.model.update(this.alignTimer * this.speed);
this.emit("loop", this.alignTimer);
this.alignTimer = 0;
} else {
this.alignTimer += durTime;
if (this.alignTimer > (1 / this.fps)) {
this.model.update(this.alignTimer * this.speed);
this.emit("loop", this.alignTimer);
this.alignTimer = 0;
}
}
}
} else {