Reference winMouseY

winMouseY

A Number variable that tracks the mouse's vertical position within the browser.

winMouseY keeps track of the mouse's position relative to the top-left corner of the browser window. For example, if the mouse is 50 pixels from the top edge of the browser, then winMouseY will be 50.

On a touchscreen device, winMouseY will hold the y-coordinate of the most recent touch point.

Note: Use mouseY to track the mouse’s y-coordinate within the canvas.

Examples

Notice any errors or typos? Please let us know. Please feel free to edit src/events/mouse.js and open a pull request!

Related References