Reference windowResized()

windowResized()

A function that's called when the browser window is resized.

Code placed in the body of windowResized() will run when the browser window's size changes. It's a good place to call resizeCanvas() or make other adjustments to accommodate the new window size.

The event parameter is optional. If added to the function declaration, it can be used for debugging or other purposes.

Examples

Syntax

windowResized([event])

Parameters

event
UIEvent:

optional resize Event.

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

Related References