Matter.Mouse
The Matter.Mouse
module contains methods for creating and manipulating mouse inputs.
Methods
Matter.Mouse._getRelativeMousePosition
(event, element, pixelRatio)
Gets the mouse position relative to an element given a screen pixel ratio.
Returns
Matter.Mouse.create
(element)
Creates a mouse input.
Parameters
-
element
HTMLElement
Returns
Mouse
A new mouse
Matter.Mouse.setElement
(mouse, element)
Sets the element the mouse is bound to (and relative to).
Parameters
-
mouse
Mouse -
element
HTMLElement
Matter.Mouse.setOffset
(mouse, offset)
Sets the mouse position offset.