* Resizes the framebuffer to a given width and height. * * The parameters, `width` and `height`, set the dimensions of the * framebuffer. For example, calling `myBuffer.resize(300, 500)` resizes * the framebuffer to 300×500 pixels, then sets `myBuffer.width` to 300 * and `myBuffer.hei
(width, height)
| 173 | * } |
| 174 | */ |
| 175 | resize(width, height) { |
| 176 | this._autoSized = false; |
| 177 | const dimensions = |
| 178 | this.renderer._adjustDimensions(width, height); |
| 179 | width = dimensions.adjustedWidth; |
| 180 | height = dimensions.adjustedHeight; |
| 181 | this.width = width; |
| 182 | this.height = height; |
| 183 | this._handleResize(); |
| 184 | } |
| 185 | |
| 186 | /** |
| 187 | * Sets the framebuffer's pixel density or returns its current density. |
no test coverage detected