The frameCount variable in p5.js is used to hold the number of frames which are displayed since the program started. Inside setup() function the value is 0, after the first iteration of draw it is 1, etc.
Below program illustrates the frameCount Variable in p5.js:
Example: This example uses frameCount variable to display the frame count.
- p5.js | width variable
- p5.js | displayWidth Variable
- p5.js | displayHeight Variable
- p5.js | height variable
- How to declare a global variable in PHP?
- PHP | Check if a variable is a function
- HTML| DOM Variable Object
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. 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.