-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '64ff5fbe34d0675196bb764e625d524086b1fada'
- Loading branch information
Showing
90 changed files
with
2,156 additions
and
1,369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.js eol=lf | ||
*.ts eol=lf | ||
*.tag eol=lf | ||
*.pug eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
declare namespace ct { | ||
/** | ||
* Use gamepads in the actions system | ||
*/ | ||
namespace gamepad { | ||
/** | ||
* Represents an event handler that runs when a gamepad is connected or disconnected | ||
* @param event - Run when connected or disconnected | ||
* @param eventHandler - Function to run | ||
*/ | ||
function on(event: "connected" | "disconnected", eventHandler:Function): void; | ||
/** | ||
* An array of Gamepad objects, one for each connected gamepad | ||
*/ | ||
var list: Array<any>; | ||
/** | ||
* Returns whether the button is pressed (1) or not (0) | ||
* @param code - Button code, can be "Button1", "Button2", "Button3", "Button4", "L1", "R1", "L2", "R2", "Select", "Start", "L3", "R3", "Up", "Down", "Left", "Right", or "Any" | ||
*/ | ||
function getButton( | ||
code: | ||
"Button1" | | ||
"Button2" | | ||
"Button3" | | ||
"Button4" | | ||
"L1" | | ||
"R1" | | ||
"L2" | | ||
"R2" | | ||
"Select" | | ||
"Start" | | ||
"L3" | | ||
"R3" | | ||
"Up" | | ||
"Down" | | ||
"Left" | | ||
"Right" | | ||
"Any" | ||
): number; | ||
/** | ||
* Gets the position of a joystick, from -1 to 1, with 0 being its resting position | ||
* @param code - Joystick axis, one of "LStickX", "LStickY", "RStickX", or "RStickY" | ||
*/ | ||
function getAxis( | ||
code: | ||
"LStickX" | | ||
"LStickY" | | ||
"RStickX" | | ||
"RStickY" | ||
): number; | ||
/** | ||
* The last button pressed | ||
*/ | ||
var lastButton: | ||
"Button1" | | ||
"Button2" | | ||
"Button3" | | ||
"Button4" | | ||
"L1" | | ||
"R1" | | ||
"L2" | | ||
"R2" | | ||
"Select" | | ||
"Start" | | ||
"L3" | | ||
"R3" | | ||
"Up" | | ||
"Down" | | ||
"Left" | | ||
"Right" | | ||
"Any"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
This module abstracts the Web Pointer API, allowing you to track any type of pointers: mouses, touch events, tablet pens, or anything else that is supported by one's system. | ||
|
||
The module replaces `ct.mouse` and `ct.touch` from previous versions, uniting their API and adding new features, like pressure and pen position reading. | ||
The module replaces `ct.mouse` and `ct.touch` from previous versions, uniting their API and adding new features, like pressure and pen position reading. `ct.touch` may still be required on iOS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.