The fullscreen() function in p5.js is used to get the current fullscreen state of the user’s browser window. If an argument is given, sets the sketch to fullscreen or not based on the value of the argument. If no argument is given, returns the current fullscreen state. Note that due to browser restrictions this can only be called on user input.
Parameters: The function does not accept any parameters.
Below program illustrates the fullscreen() function in p5.js:
Before Clicking the screen:
After Clicking the screen:
- How to set fullscreen iframe?
- Web Window API | DOM Window fullscreen property
- How to get the function name inside a function in PHP ?
- CSS | hsl() Function
- PHP | sin( ) Function
- CSS | var() Function
- p5.js | second() function
- D3.js | d3.hcl() Function
- D3.js | d3.lab() Function
- D3.js | d3.map.set() Function
- PHP | key() Function
- PHP | cos( ) Function
- p5.js | max() function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.