Environment
These variables keep track of attributes of the p5 environment
Last updated
These variables keep track of attributes of the p5 environment
frameCountThis variable stores how many frames have been drawn since the sketch (most recently) started.

For example - if the frame rate is set to 60 (which is the default) - after 3 seconds, frameCount = 180 because this is how many frames have been drawn during that time.
widthThis variable stores the width of the canvas in pixels, not to be confused with the width of the window, windowWidth

heightThis variable stores the height of the canvas in pixels, not to be confused with the height of the window, windowHeight

windowWidthThis variable stores the width of the window, not to be confused with the width of the canvas width.
This variable changes as the window size changes.

windowHeightThis variable stores the height of the window, not to be confused with the height of the canvas height.
This variable changes as the window size changes.

Find these documents helpful? Let the people who made them help your child learn to code at Strivemath!
We'd love to hear your Feedback/Comments here.
Last updated