Reference movedX

movedX

A Number system variable that tracks the mouse's horizontal movement.

movedX tracks how many pixels the mouse moves left or right between frames. movedX will have a negative value if the mouse moves left between frames and a positive value if it moves right. movedX can be calculated as mouseX - pmouseX.

Note: movedX continues updating even when requestPointerLock() is active.

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