* Reset all state to defaults and clear the stack. * @param {number} width - canvas width * @param {number} height - canvas height
(width, height)
| 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() { |