MCPcopy Index your code
hub / github.com/processing/p5.js / resize

Method resize

src/webgl/p5.Framebuffer.js:175–184  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 1

makeSpecularTextureMethod · 0.95

Calls 2

_handleResizeMethod · 0.95
_adjustDimensionsMethod · 0.45

Tested by

no test coverage detected