Mouse
mouseX
mouseXIt tells the x-coordinate of the mouse relative to the default origin (either TOP_LEFT or BOTTOM_LEFT) in the current frame.

mouseY
mouseYIt tells the y-coordinate of the mouse relative to the default origin (either TOP_LEFT or BOTTOM_LEFT) in the current frame.

pmouseX
pmouseXIt tells the x-coordinate of the mouse relative to the default origin (either TOP_LEFT or BOTTOM_LEFT) in the previous frame.
pmouseY
pmouseYIt tells the y-coordinate of the mouse relative to the default origin (either TOP_LEFT or BOTTOM_LEFT) in the previous frame.
mouseMovedX
mouseMovedXIt tells us how much did the mouse move horizontally since the last frame. It's then equivalent to the value mouseX - pmouseX
mouseMovedY
mouseMovedYIt tells us how much did the mouse move vertically since the last frame. It's then equivalent to the value mouseY - pmouseY
winMouseX
winMouseXThis built-in variable contains the current horizontal position of the mouse, relative to origin of the window.
winMouseY
winMouseYThis built-in variable contains the current vertical position of the mouse, relative to origin of the window.
pwinMouseX
pwinMouseXThis built-in variable contains the horizontal position of the mouse in the previous frame, relative to origin of the window.
pwinMouseY
pwinMouseYThis built-in variable contains the vertical position of the mouse in the previous frame, relative to origin of the window.
mouseButton
mouseButtonIt stores the label of the last mouse button that was pressed. It returns one of three values "left", "right", "center".
When the sketch is run and nothing is pressed yet, it takes the value 0.
You can use these built-in constants instead
LEFT = "left"
RIGHT = "right"
CENTER = "center"mouseIsPressed
mouseIsPressedIt returns the value True if any mouse button is currently pressed. It returns False otherwise.
Last updated