-
getMouseEvent
()MouseEvent
-
get last mouse event
Returns:
Type |
Description |
MouseEvent
|
the mouse event |
-
-
get mouse x position
Returns:
Type |
Description |
Number
|
mouse x position |
-
-
get mouse y position
Returns:
Type |
Description |
Number
|
mouse y position |
-
-
checks if a certain key is down (currently pressed)
Name |
Type |
Description |
code |
Number
|
key code (number) |
Returns:
Type |
Description |
Boolean
|
true if key is pressed; false otherwise. |
-
-
checks if a certain key is down (currently pressed)
Name |
Type |
Description |
c |
String
|
key character |
Returns:
Type |
Description |
Boolean
|
true if key is pressed; false otherwise. |
-
-
checks if left mouse button is down
Returns:
Type |
Description |
Boolean
|
true if pressed; false otherwise |
-
-
checks if mouse is down (mouse button is pressed)
Returns:
Type |
Description |
Boolean
|
true if mouse button is pressed; false otherwise. |
-
-
checks if right mouse button is down
Returns:
Type |
Description |
Boolean
|
true if pressed; false otherwise |
-
-
read text file
Name |
Type |
Description |
file |
String
|
the file path |
Returns:
file text
-
-
register callback to key up
Name |
Type |
Description |
callback |
function
|
callback function(event) to be called when keyup is fired |
-
setOnKeyUpSpec
(key, callback)
-
register callback to key up for specific key
Name |
Type |
Description |
key |
Number
|
the key code of the key that fires the event |
callback |
function
|
callback function(event) to be called when keyup is fired with key |
-
setOnMouseDown
(callback)
-
register callback to mouse down
Name |
Type |
Description |
callback |
function
|
callback function(e) to be called when mousedown is fired. |
-
-
register callback to mouse up
Name |
Type |
Description |
callback |
function
|
callback function(e) to be called when mouseup is fired. |