Reference fullscreen()

fullscreen()

Toggles full-screen mode or returns the current mode.

Calling fullscreen(true) makes the sketch full-screen. Calling fullscreen(false) makes the sketch its original size.

Calling fullscreen() without an argument returns true if the sketch is in full-screen mode and false if not.

Note: Due to browser restrictions, fullscreen() can only be called with user input such as a mouse press.

Examples

Syntax

fullscreen([val])

Parameters

val

whether the sketch should be in fullscreen mode.

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