()
| 1033 | } |
| 1034 | |
| 1035 | step() { |
| 1036 | this.pause(); |
| 1037 | |
| 1038 | const nextEvent = this.trace.getNextEvent(this.currentTime); |
| 1039 | |
| 1040 | if (nextEvent) { |
| 1041 | // Calculate delta to reach next event + epsilon |
| 1042 | const targetTime = nextEvent.timestamp + 0.1; |
| 1043 | const delta = targetTime - this.currentTime; |
| 1044 | if (delta > 0) { |
| 1045 | this._advanceTime(delta); |
| 1046 | } |
| 1047 | } |
| 1048 | } |
| 1049 | |
| 1050 | _animate(currentTime = performance.now()) { |
| 1051 | const deltaTime = currentTime - this.lastTime; |
no test coverage detected