(frameTime: number)
| 83 | } |
| 84 | |
| 85 | addFrame(frameTime: number): void { |
| 86 | this.frameTimes.push(frameTime); |
| 87 | if (this.frameTimes.length > FRAME_BUFFER_SIZE) { |
| 88 | this.frameTimes.shift(); |
| 89 | } |
| 90 | this.render(); |
| 91 | } |
| 92 | |
| 93 | private render(): void { |
| 94 | const { ctx, canvas, frameTimes } = this; |
no test coverage detected