p5.js | height variable
The height variable in p5.js is a system variable which stores the height of the drawing canvas. It sets the second parameter of createCanvas() function.
Below programs illustrate the height variable in p5.js:
Example 1: This example uses height variable to display the height of canvas.
Example 2: This example uses height variable to display the height of window.