new Mouse(target)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
target |
DomElement | where to bind the listeners to, defaults to document |
Methods
destroy()
- Source:
unbind all event listeners to the target
isButtonPressed(n) → {Boolean}
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
n |
Number | button key |
Returns:
if it is pressed or not
- Type
- Boolean
left() → {Boolean}
- Source:
Check if left button is pressed
Returns:
if it is pressed or not
- Type
- Boolean
middle() → {Boolean}
- Source:
Check if middle button is pressed
Returns:
if it is pressed or not
- Type
- Boolean
right() → {Boolean}
- Source:
Check if right button is pressed
Returns:
if it is pressed or not
- Type
- Boolean
Events
down
- Source:
Mouse down event.
move
- Source:
Mouse move event.
up
- Source:
Mouse up event.