p5.js | Mouse | pmouseY
The pmouseY variable in p5.js is used to store the vertical position of the mouse cursor in the frame previous to the current active frame, relative to the origin of the canvas.
Below programs illustrate the pmouseY variable in p5.js:
Example 1: This example uses pmouseY variable to draw mouse pointer as circle.
Example 2: This example uses pmouseY variable to display the position of mouse pointer.