Exposes mouse movement, scrolling, and buttons pressed.
- Source:
Methods
(static) get() → {Object}
Returns the mouse state.
- Source:
Returns:
- Type
- Object
(static) getMoveX() → {Number}
Returns any movement along the x-axis during the previous frame, in pixels.
- Source:
Returns:
- Type
- Number
(static) getMoveY() → {Number}
Returns any movement along the y-axis during the previous frame, in pixels.
- Source:
Returns:
- Type
- Number
(static) getWheelX() → {Number}
Returns any scrolling along the x-axis during the previous frame. Beware that this is unitless.
- Source:
- To Do:
-
- Consider WheelEvent.deltaMode to normalize values across devices
Returns:
- Type
- Number
(static) getWheelY() → {Number}
Returns any scrolling along the y-axis during the previous frame. Beware that this is unitless.
- Source:
- To Do:
-
- Consider WheelEvent.deltaMode to normalize values across devices
Returns:
- Type
- Number
(static) getWheelZ() → {Number}
Returns any scrolling along the z-axis during the previous frame. Beware that this is unitless.
- Source:
- To Do:
-
- Consider WheelEvent.deltaMode to normalize values across devices
Returns:
- Type
- Number
(static) isButton(button) → {boolean}
Returns whether button
is pressed.
Parameters:
Name | Type | Description |
---|---|---|
button |
Number |
- Source:
- See:
Returns:
- Type
- boolean
(static) reset()
Resets the mouse state.
- Source:
(static) update()
Decrements previous from current state values so they reflect only changes since last frame.
- Source: