@xtctwins/tctwins-core 1.0.19 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,45 +9,61 @@ import { Component } from "../Component";
9
9
  * * Located at {@link Scene#input}
10
10
  */
11
11
  export declare class Input extends Component {
12
- readonly KEY_CTRL: number;
13
-
14
- keyDown: boolean[];
15
-
16
- keyboardEnabled: boolean;
17
-
18
- /**
19
- * Sets whether input handlers are enabled.
20
- */
21
- setEnabled(enable: boolean): void;
22
-
23
- /**
24
- * Gets whether input handlers are enabled.
25
- */
26
- getEnabled(): boolean
27
-
28
- /**
29
- * Sets whether or not keyboard input is enabled.
30
- */
31
- setKeyboardEnabled(enable: boolean): void;
32
-
33
- /**
34
- * Gets whether keyboard input is enabled.
35
- */
36
- getKeyboardEnabled(): boolean;
37
-
38
- /**
39
- * Fires on mouse events
40
- * @param event The loaded event
41
- * @param callback Called fired on the event
42
- * @param scope Scope for the callback
43
- */
44
- on(event: "mousedown" | "mouseup" | "mouseclicked" | "dblclick", callback: (canvasCoords: number[]) => void, scope?: any): string;
45
-
46
- /**
47
- * Fires on keyboard events
48
- * @param event The loaded event
49
- * @param callback Called fired on the event
50
- * @param scope Scope for the callback
51
- */
52
- on(event: "keydown" | "keyup", callback: (keyCode: number) => void, scope?: any): string;
53
- }
12
+ readonly KEY_CTRL: number;
13
+
14
+ keyDown: boolean[];
15
+
16
+ keyboardEnabled: boolean;
17
+
18
+ /**
19
+ * Sets whether input handlers are enabled.
20
+ */
21
+ setEnabled(enable: boolean): void;
22
+
23
+ /**
24
+ * Gets whether input handlers are enabled.
25
+ */
26
+ getEnabled(): boolean;
27
+
28
+ /**
29
+ * Sets whether or not keyboard input is enabled.
30
+ */
31
+ setKeyboardEnabled(enable: boolean): void;
32
+
33
+ /**
34
+ * Gets whether keyboard input is enabled.
35
+ */
36
+ getKeyboardEnabled(): boolean;
37
+
38
+ /**
39
+ * Fires on mouse events
40
+ * @param event The loaded event
41
+ * @param callback Called fired on the event
42
+ * @param scope Scope for the callback
43
+ */
44
+ on(
45
+ event: "mousedown" | "mouseup" | "mouseclicked" | "dblclick",
46
+ callback: (canvasCoords: number[]) => void,
47
+ scope?: any
48
+ ): string;
49
+
50
+ /**
51
+ * Fires on touch events
52
+ * @param event The loaded event
53
+ * @param callback Called fired on the event
54
+ * @param scope Scope for the callback
55
+ */
56
+ on(
57
+ event: "touchstart" | "touchend" | "touchclicked",
58
+ callback: (canvasCoords: number[]) => void,
59
+ scope?: any
60
+ ): string;
61
+
62
+ /**
63
+ * Fires on keyboard events
64
+ * @param event The loaded event
65
+ * @param callback Called fired on the event
66
+ * @param scope Scope for the callback
67
+ */
68
+ on(event: "keydown" | "keyup", callback: (keyCode: number) => void, scope?: any): string;
69
+ }