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
Boolean:

whether the sketch should be in fullscreen mode.

Returns

Boolean: current fullscreen state.
This page is generated from the comments in src/core/environment.js . Please feel free to edit it and submit a pull request!

Related References