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

Method reset

packages/melonjs/src/video/renderstate.js:226–235  ·  view source on GitHub ↗

* Reset all state to defaults and clear the stack. * @param {number} width - canvas width * @param {number} height - canvas height

(width, height)

Source from the content-addressed store, hash-verified

224 * @param {number} height - canvas height
225 */
226 reset(width, height) {
227 this._stackDepth = 0;
228 this.currentTransform.identity();
229 this.currentScissor[0] = 0;
230 this.currentScissor[1] = 0;
231 this.currentScissor[2] = width;
232 this.currentScissor[3] = height;
233 this.currentShader = undefined;
234 this.currentDepth = 0;
235 }
236
237 /** @private — doubles stack capacity when exceeded */
238 _growStacks() {

Callers

nothing calls this directly

Calls 1

identityMethod · 0.45

Tested by

no test coverage detected