参考 resize()

resize()

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.height 500.

示例

语法

resize(width, height)

参数

width

width of the framebuffer.

height

height of the framebuffer.

Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/p5.Framebuffer.js and open a pull request!

相关参考