Static p5_sys::global::windowResized [−][src]
pub static windowResized: WindowResizedInternalType
Expand description
The windowResized() function is called once every time the browser window is resized. This is a good place to resize the canvas or do any other adjustments to accommodate the new window size.
Examples
function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(0, 100, 200); } function windowResized() { resizeCanvas(windowWidth, windowHeight); }