MCPcopy Create free account
hub / github.com/melonjs/melonJS / reset

Method reset

packages/melonjs/src/system/timer.ts:113–122  ·  view source on GitHub ↗

* reset time (e.g. usefull in case of pause) * @ignore

()

Source from the content-addressed store, hash-verified

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.

Callers 1

constructorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected