Members
kKeys
- Source:
kMouseButton
- Source:
Methods
getMousePosX() → {Number}
Returns mouse X position.
- Source:
Returns:
X position of mouse.
- Type
- Number
getMousePosY() → {Number}
Returns mouse Y position.
- Source:
Returns:
Y position of mouse.
- Type
- Number
initialize(canvasID) → {void}
Initialize the input manager.
Intitalize and intsntiate input listeners.
Parameters:
Name | Type | Description |
---|---|---|
canvasID |
GLCanvas | HTML canvas |
- Source:
Returns:
- Type
- void
isButtonClicked(button) → {Boolean}
returns if button is clicked.
Parameters:
Name | Type | Description |
---|---|---|
button |
Number | mouseButton | button to check for ckicked state. |
- Source:
Returns:
true if button is clicked.
- Type
- Boolean
isButtonPressed(button) → {Boolean}
returns if button is pressed.
Parameters:
Name | Type | Description |
---|---|---|
button |
Number | mouseButton | button to check for pressed state. |
- Source:
Returns:
true if button is pressed.
- Type
- Boolean
isButtonReleased(button) → {Boolean}
returns if button is released.
Parameters:
Name | Type | Description |
---|---|---|
button |
Number | mouseButton | button to check for release state. |
- Source:
Returns:
true if button is released
- Type
- Boolean
isKeyClicked(keyCode) → {Boolean}
returns if key is clicked.
Parameters:
Name | Type | Description |
---|---|---|
keyCode |
Number | keys | key to check for clicked state. |
- Source:
Returns:
true if key is clicked
- Type
- Boolean
isKeyPressed(keyCode) → {Boolean}
Function for GameEngine programmer to test if a key is pressed down
returns if key is pressed.
Parameters:
Name | Type | Description |
---|---|---|
keyCode |
Number | keys | key to check for pressed state. |
- Source:
Returns:
true if key is pressed
- Type
- Boolean
isKeyReleased(keyCode) → {Boolean}
returns if key is released.
Parameters:
Name | Type | Description |
---|---|---|
keyCode |
Number | keys | key to check for released state. |
- Source:
Returns:
true if key is released
- Type
- Boolean
update() → {void}
Update function called on Gameloop.
- Source:
Returns:
- Type
- void