* reset time (e.g. usefull in case of pause) * @ignore
()
| 111 | * @ignore |
| 112 | */ |
| 113 | reset() { |
| 114 | // set to "now" |
| 115 | this.last = this.now = globalThis.performance.now(); |
| 116 | this.delta = 0; |
| 117 | // reset delta counting variables |
| 118 | this.framedelta = 0; |
| 119 | this.framecount = 0; |
| 120 | this.step = 1000 / this.maxfps; |
| 121 | this.minstep = (1000 / this.maxfps) * 1.25; |
| 122 | } |
| 123 | |
| 124 | /** |
| 125 | * Calls a function once after a specified delay. See me.timer.setInterval to repeativly call a function. |