Members
(static) kKeys
- Source:
(static) kMouseButton
- Source:
Methods
(static) getMousePosX() → {Number}
Returns mouse X position.
- Source:
Returns:
X position of mouse.
- Type
- Number
(static) getMousePosY() → {Number}
Returns mouse Y position.
- Source:
Returns:
Y position of mouse.
- Type
- Number
(static) initialize(canvasID) → {void}
Initialize the input manager.
Intitalize and intsntiate input listeners.
Parameters:
Name | Type | Description |
---|---|---|
canvasID |
GLCanvas | HTML canvas |
- Source:
Returns:
- Type
- void
(static) 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
(static) 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
(static) 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
(static) 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
(static) 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
(static) 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
(static) update() → {void}
Update function called on Gameloop.
- Source:
Returns:
- Type
- void