angry-pixel 1.2.5 → 1.2.7

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.
Files changed (156) hide show
  1. package/lib/index.cjs.js +2 -1
  2. package/lib/index.cjs.js.map +1 -0
  3. package/lib/index.d.ts +5 -41
  4. package/lib/index.esm.js +2 -1
  5. package/lib/index.esm.js.map +1 -0
  6. package/lib/index.js +2 -1
  7. package/lib/index.js.map +1 -0
  8. package/package.json +6 -30
  9. package/.github/workflows/analyzeCode.yml +0 -25
  10. package/.github/workflows/buildCode.yml +0 -23
  11. package/.github/workflows/main.yml +0 -15
  12. package/.github/workflows/setupNode.yml +0 -40
  13. package/api-docs/.nojekyll +0 -1
  14. package/api-docs/assets/highlight.css +0 -92
  15. package/api-docs/assets/main.js +0 -59
  16. package/api-docs/assets/navigation.js +0 -1
  17. package/api-docs/assets/search.js +0 -1
  18. package/api-docs/assets/style.css +0 -1383
  19. package/api-docs/classes/Animator.html +0 -128
  20. package/api-docs/classes/AudioPlayer.html +0 -131
  21. package/api-docs/classes/BallCollider.html +0 -132
  22. package/api-docs/classes/BoxCollider.html +0 -136
  23. package/api-docs/classes/Button.html +0 -125
  24. package/api-docs/classes/Camera.html +0 -114
  25. package/api-docs/classes/Component.html +0 -106
  26. package/api-docs/classes/EdgeCollider.html +0 -134
  27. package/api-docs/classes/Game.html +0 -24
  28. package/api-docs/classes/GameCamera.html +0 -163
  29. package/api-docs/classes/GameObject.html +0 -149
  30. package/api-docs/classes/GamepadController.html +0 -11
  31. package/api-docs/classes/GamepadData.html +0 -81
  32. package/api-docs/classes/KeyboardController.html +0 -43
  33. package/api-docs/classes/MaskRenderer.html +0 -119
  34. package/api-docs/classes/MouseController.html +0 -14
  35. package/api-docs/classes/PhysicsComponent.html +0 -107
  36. package/api-docs/classes/PolygonCollider.html +0 -134
  37. package/api-docs/classes/PreRenderComponent.html +0 -107
  38. package/api-docs/classes/Rectangle.html +0 -30
  39. package/api-docs/classes/RigidBody.html +0 -123
  40. package/api-docs/classes/Rotation.html +0 -5
  41. package/api-docs/classes/Scene.html +0 -73
  42. package/api-docs/classes/SpacePointer.html +0 -147
  43. package/api-docs/classes/Sprite.html +0 -20
  44. package/api-docs/classes/SpriteRenderer.html +0 -134
  45. package/api-docs/classes/TextRenderer.html +0 -138
  46. package/api-docs/classes/TiledTilemapRenderer.html +0 -127
  47. package/api-docs/classes/TilemapCollider.html +0 -124
  48. package/api-docs/classes/TilemapRenderer.html +0 -126
  49. package/api-docs/classes/TouchController.html +0 -8
  50. package/api-docs/classes/Transform.html +0 -124
  51. package/api-docs/classes/Vector2.html +0 -65
  52. package/api-docs/classes/VideoRenderer.html +0 -145
  53. package/api-docs/enums/BroadPhaseMethods.html +0 -3
  54. package/api-docs/enums/ButtonType.html +0 -3
  55. package/api-docs/enums/CollisionMethods.html +0 -3
  56. package/api-docs/enums/RigidBodyType.html +0 -4
  57. package/api-docs/enums/TextOrientation.html +0 -5
  58. package/api-docs/enums/TilemapOrientation.html +0 -5
  59. package/api-docs/functions/between.html +0 -5
  60. package/api-docs/functions/clamp.html +0 -5
  61. package/api-docs/functions/fixedRound.html +0 -4
  62. package/api-docs/functions/randomFloat.html +0 -4
  63. package/api-docs/functions/randomInt.html +0 -4
  64. package/api-docs/functions/range.html +0 -5
  65. package/api-docs/index.html +0 -37
  66. package/api-docs/interfaces/AnimationConfig.html +0 -10
  67. package/api-docs/interfaces/AnimatorOptions.html +0 -6
  68. package/api-docs/interfaces/AudioPlayerOptions.html +0 -8
  69. package/api-docs/interfaces/BallColliderOptions.html +0 -16
  70. package/api-docs/interfaces/BoxColliderOptions.html +0 -20
  71. package/api-docs/interfaces/ButtonOptions.html +0 -16
  72. package/api-docs/interfaces/ColliderComponent.html +0 -14
  73. package/api-docs/interfaces/CollisionData.html +0 -10
  74. package/api-docs/interfaces/EdgeColliderOptions.html +0 -18
  75. package/api-docs/interfaces/GameConfig.html +0 -28
  76. package/api-docs/interfaces/IAssetManager.html +0 -40
  77. package/api-docs/interfaces/ICollider.html +0 -11
  78. package/api-docs/interfaces/ICollision.html +0 -4
  79. package/api-docs/interfaces/ICollisionResolution.html +0 -4
  80. package/api-docs/interfaces/IDomManager.html +0 -6
  81. package/api-docs/interfaces/IGameObjectManager.html +0 -49
  82. package/api-docs/interfaces/IInputManager.html +0 -12
  83. package/api-docs/interfaces/IPhysicsManager.html +0 -8
  84. package/api-docs/interfaces/IRenderManager.html +0 -7
  85. package/api-docs/interfaces/ISceneManager.html +0 -18
  86. package/api-docs/interfaces/ITimeManager.html +0 -16
  87. package/api-docs/interfaces/MaskRendererOptions.html +0 -18
  88. package/api-docs/interfaces/PolygonColliderOptions.html +0 -18
  89. package/api-docs/interfaces/RigidBodyOptions.html +0 -17
  90. package/api-docs/interfaces/Slice.html +0 -5
  91. package/api-docs/interfaces/SpriteConfig.html +0 -10
  92. package/api-docs/interfaces/SpriteRendererOptions.html +0 -32
  93. package/api-docs/interfaces/TextRendererOptions.html +0 -38
  94. package/api-docs/interfaces/TiledChunk.html +0 -7
  95. package/api-docs/interfaces/TiledLayer.html +0 -17
  96. package/api-docs/interfaces/TiledTilemap.html +0 -9
  97. package/api-docs/interfaces/TiledTilemapRendererOptions.html +0 -18
  98. package/api-docs/interfaces/TilemapColliderOptions.html +0 -12
  99. package/api-docs/interfaces/TilemapRendererOptions.html +0 -22
  100. package/api-docs/interfaces/Tileset.html +0 -13
  101. package/api-docs/interfaces/TouchInteraction.html +0 -6
  102. package/api-docs/interfaces/VideoRendererOptions.html +0 -34
  103. package/api-docs/modules.html +0 -85
  104. package/api-docs/types/CollisionMatrix.html +0 -1
  105. package/lib/component/Animation.d.ts +0 -12
  106. package/lib/component/Animator.d.ts +0 -139
  107. package/lib/component/AudioPlayer.d.ts +0 -97
  108. package/lib/component/Button.d.ts +0 -117
  109. package/lib/component/Camera.d.ts +0 -47
  110. package/lib/component/RigidBody.d.ts +0 -97
  111. package/lib/component/Sprite.d.ts +0 -22
  112. package/lib/component/Transform.d.ts +0 -65
  113. package/lib/component/collider/BallCollider.d.ts +0 -73
  114. package/lib/component/collider/BoxCollider.d.ts +0 -90
  115. package/lib/component/collider/Collider.d.ts +0 -82
  116. package/lib/component/collider/EdgeCollider.d.ts +0 -81
  117. package/lib/component/collider/PolygonCollider.d.ts +0 -92
  118. package/lib/component/collider/TilemapCollider.d.ts +0 -71
  119. package/lib/component/rendering/MaskRenderer.d.ts +0 -83
  120. package/lib/component/rendering/Sprite.d.ts +0 -61
  121. package/lib/component/rendering/SpriteRenderer.d.ts +0 -133
  122. package/lib/component/rendering/TextRenderer.d.ts +0 -145
  123. package/lib/component/rendering/TiledTilemapRenderer.d.ts +0 -186
  124. package/lib/component/rendering/TilemapRenderer.d.ts +0 -170
  125. package/lib/component/rendering/VideoRenderer.d.ts +0 -158
  126. package/lib/core/Component.d.ts +0 -203
  127. package/lib/core/Game.d.ts +0 -89
  128. package/lib/core/GameActor.d.ts +0 -131
  129. package/lib/core/GameConfig.d.ts +0 -61
  130. package/lib/core/GameObject.d.ts +0 -196
  131. package/lib/core/Scene.d.ts +0 -45
  132. package/lib/core/facades/AssetManagerFacade.d.ts +0 -51
  133. package/lib/core/facades/DomManagerFacade.d.ts +0 -8
  134. package/lib/core/facades/GameObjectManagerFacade.d.ts +0 -70
  135. package/lib/core/facades/InputManagerFacade.d.ts +0 -13
  136. package/lib/core/facades/SceneManagerFacade.d.ts +0 -18
  137. package/lib/core/facades/TimeManagerFacade.d.ts +0 -11
  138. package/lib/core/ioc/Config.d.ts +0 -4
  139. package/lib/core/managers/AssetManager.d.ts +0 -95
  140. package/lib/core/managers/DomManager.d.ts +0 -23
  141. package/lib/core/managers/GameObjectManager.d.ts +0 -117
  142. package/lib/core/managers/HeadlessIterationManager.d.ts +0 -30
  143. package/lib/core/managers/IterationManager.d.ts +0 -60
  144. package/lib/core/managers/SceneManager.d.ts +0 -59
  145. package/lib/core/managers/TimeManager.d.ts +0 -73
  146. package/lib/gameObject/GameCamera.d.ts +0 -38
  147. package/lib/gameObject/SpacePointer.d.ts +0 -15
  148. package/lib/input/GamepadController.d.ts +0 -225
  149. package/lib/input/InputManager.d.ts +0 -37
  150. package/lib/input/KeyboardController.d.ts +0 -81
  151. package/lib/input/MouseController.d.ts +0 -56
  152. package/lib/input/TouchController.d.ts +0 -45
  153. package/lib/utils/Container.d.ts +0 -13
  154. package/lib/utils/Exception.d.ts +0 -5
  155. package/lib/utils/UUID.d.ts +0 -1
  156. package/typedoc.json +0 -13
@@ -1,225 +0,0 @@
1
- import { Vector2 } from "angry-pixel-math";
2
- /**
3
- * Manages the connected gamepads
4
- * @public
5
- * @category Input
6
- * @example
7
- * ```js
8
- * // get all connected gamepads
9
- * const gamepads = this.inputManager.gamepad.getGamepads();
10
- *
11
- * // get the first connected gamepad
12
- * const gamepad = this.inputManager.gamepad.getGamepad(0);
13
- * ```
14
- */
15
- export declare class GamepadController {
16
- private readonly gamepads;
17
- /** @private */
18
- constructor();
19
- /**
20
- * Returns a gamepad by its numerical index, or null if it does not exist.
21
- * @param index The gamepad index to find
22
- * @returns The found gamepad or NULL
23
- */
24
- getGamepad(index: number): GamepadData | null;
25
- /**
26
- * Retruns all connected gamepads.
27
- * @returns An array of gamepads
28
- */
29
- getGamepads(): GamepadData[];
30
- private eventHandler;
31
- private gamepadConnected;
32
- private gamepadDisconected;
33
- /** @private */
34
- update(): void;
35
- private getGamepadsFromBrowser;
36
- }
37
- /**
38
- * Represents a connected gamepad and has the information of all its buttons and axes.
39
- * @public
40
- * @category Input
41
- * @example
42
- * ```js
43
- * const gamepad = this.inputManager.gamepad.getGamepad(0);
44
- *
45
- * if (gamepad.dpadAxes.x > 1) {
46
- * // if the depad x-axis is pressed to the right, do some action
47
- * }
48
- *
49
- * if (gamepad.rightFace) {
50
- * // if the right face button is pressed, do some action
51
- * }
52
- * ```
53
- */
54
- export declare class GamepadData {
55
- private _gamepad;
56
- private readonly buttons;
57
- private readonly axes;
58
- private readonly _dpadAxes;
59
- private readonly _leftStickAxes;
60
- private readonly _rightStickAxes;
61
- private _vibrating;
62
- /** @private */
63
- updateFromGamepad(gamepad: Gamepad): void;
64
- /**
65
- * The gamepad id
66
- * @readonly
67
- */
68
- get id(): string;
69
- /**
70
- * TRUE if the gamepad is connected
71
- * @readonly
72
- */
73
- get connected(): boolean;
74
- /**
75
- * Checks if a button is being pressed.
76
- * @param index the button index
77
- * @returns TRUE if the button is pressed, FALSE instead
78
- * @see [Gamepad: buttons property](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/buttons)
79
- */
80
- getButtonPressed(index: number): boolean;
81
- /**
82
- * Returns the value of an axis by its index
83
- * @param index The axis index:
84
- * - 0: Left stick horizontal axix
85
- * - 1: Left stick vertical axix
86
- * - 2: Right stick horizontal axix
87
- * - 3: Right stick vertical axix
88
- * @returns The axis value
89
- * @see [Gamepad: axes property](https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/axes)
90
- */
91
- getAxis(index: number): number;
92
- /**
93
- * The values of the d-pad axes represented as a xy vector
94
- * @readonly
95
- */
96
- get dpadAxes(): Vector2;
97
- /**
98
- * The values of the left stick axes represented as a xy vector
99
- * @readonly
100
- */
101
- get leftStickAxes(): Vector2;
102
- /**
103
- * The values of the right stick axes represented as a xy vector
104
- * @readonly
105
- */
106
- get rightStickAxes(): Vector2;
107
- /**
108
- * TRUE if d-pad up is pressed
109
- * @readonly
110
- */
111
- get dpadUp(): boolean;
112
- /**
113
- * TRUE if d-pad down is pressed
114
- * @readonly
115
- */
116
- get dpadDown(): boolean;
117
- /**
118
- * TRUE if d-pad left is pressed
119
- * @readonly
120
- */
121
- get dpadLeft(): boolean;
122
- /**
123
- * TRUE if d-pad right is pressed
124
- * @readonly
125
- */
126
- get dpadRight(): boolean;
127
- /**
128
- * TRUE if bottom face button is pressed (Dual Shock: X. Xbox: A. Nintendo: B)
129
- * @readonly
130
- */
131
- get bottomFace(): boolean;
132
- /**
133
- * TRUE if right face button is pressed (Dual Shock: Square. Xbox: X. Nintendo: Y)
134
- * @readonly
135
- */
136
- get rightFace(): boolean;
137
- /**
138
- * TRUE if left face button is pressed (Dual Shock: Circle. Xbox: B. Nintendo: A)
139
- * @readonly
140
- */
141
- get leftFace(): boolean;
142
- /**
143
- * TRUE if top face button is pressed (Dual Shock: Triangle. Xbox: Y. Nintendo: X)
144
- * @readonly
145
- */
146
- get topFace(): boolean;
147
- /**
148
- * TRUE if left shoulder button is pressed (Dual Shock: L1. Xbox: LB. Nintendo: L)
149
- * @readonly
150
- */
151
- get leftShoulder(): boolean;
152
- /**
153
- * TRUE if right shoulder button is pressed (Dual Shock: R1. Xbox: RB. Nintendo: R)
154
- * @readonly
155
- */
156
- get rightShoulder(): boolean;
157
- /**
158
- * TRUE if left trigger button is pressed (Dual Shock: L2. Xbox: LT. Nintendo: ZL)
159
- * @readonly
160
- */
161
- get leftTrigger(): boolean;
162
- /**
163
- * TRUE if right trigger button is pressed (Dual Shock: R2. Xbox: RT. Nintendo: ZR)
164
- * @readonly
165
- */
166
- get rightTrigger(): boolean;
167
- /**
168
- * TRUE if back button is pressed (a.k.a. select button)
169
- * @readonly
170
- */
171
- get back(): boolean;
172
- /**
173
- * TRUE if start button is pressed (a.k.a. options button)
174
- * @readonly
175
- */
176
- get start(): boolean;
177
- /**
178
- * TRUE if left stick button is pressed
179
- * @readonly
180
- */
181
- get leftStickButton(): boolean;
182
- /**
183
- * TRUE if right stick button is pressed
184
- * @readonly
185
- */
186
- get rightStickButton(): boolean;
187
- /**
188
- * Left stick horizontal axes value
189
- * @readonly
190
- */
191
- get leftStickHorizontal(): number;
192
- /**
193
- * Left stick vertical axes value
194
- * @readonly
195
- */
196
- get leftStickVertical(): number;
197
- /**
198
- * Right stick horizontal axes value
199
- * @readonly
200
- */
201
- get rightStickHorizontal(): number;
202
- /**
203
- * Right stick vertical axes value
204
- * @readonly
205
- */
206
- get rightStickVertical(): number;
207
- /**
208
- * TRUE if any button is pressed
209
- * @readonly
210
- */
211
- get anyButtonPressed(): boolean;
212
- /**
213
- * TRUE if the vibration is on
214
- * @readonly
215
- */
216
- get vibrating(): boolean;
217
- /**
218
- * Turns on the gamepad vibration
219
- * @param duration The duration of the effect in milliseconds
220
- * @param weakMagnitude Rumble intensity of the high-frequency (weak) rumble motors, normalized to the range between 0.0 and 1.0
221
- * @param strongMagnitude Rumble intensity of the low-frequency (strong) rumble motors, normalized to the range between 0.0 and 1.0
222
- * @param startDelay The delay in milliseconds before the effect is started
223
- */
224
- vibrate(duration?: number, weakMagnitude?: number, strongMagnitude?: number, startDelay?: number): void;
225
- }
@@ -1,37 +0,0 @@
1
- import { MouseController } from "./MouseController";
2
- import { KeyboardController } from "./KeyboardController";
3
- import { GamepadController } from "./GamepadController";
4
- import { TouchController } from "./TouchController";
5
- /**
6
- * Manages the input sources: Keyboard, Mouse, Gamepad, Touch.
7
- * @public
8
- * @category Managers
9
- * @example
10
- * ```js
11
- * const mouseController = this.inputManager.mouse;
12
- * const keyboardController = this.inputManager.keyboard;
13
- * const gamepadController = this.inputManager.gamepad;
14
- * const touchController = this.inputManager.touch;
15
- * ```
16
- */
17
- export interface IInputManager {
18
- /** Manages mouse information. */
19
- mouse: MouseController;
20
- /** Manages keyboard information. */
21
- keyboard: KeyboardController;
22
- /** Manages gamepads information. */
23
- gamepad: GamepadController;
24
- /** Manages toush information. */
25
- touch: TouchController;
26
- /** @private */
27
- update(): void;
28
- }
29
- /** @private */
30
- export declare class InputManager implements IInputManager {
31
- mouse: MouseController;
32
- keyboard: KeyboardController;
33
- gamepad: GamepadController;
34
- touch: TouchController;
35
- constructor(mouse: MouseController, keyboard: KeyboardController, gamepad: GamepadController, touch: TouchController);
36
- update(): void;
37
- }
@@ -1,81 +0,0 @@
1
- /**
2
- * Manages keyboard interaction. It uses the **code** property of the **js keyboard event**.
3
- * @see [KeyboardEvent: code property](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
4
- * @public
5
- * @category Input
6
- * @example
7
- * ```js
8
- * const keyboard = this.inputManager.keyboard;
9
- *
10
- * if (keyboard.isPressed("ArrowRight")) {
11
- * // if the right arrow key is pressed, do some action
12
- * }
13
- *
14
- * if (keyboard.orPressed("Enter", "Space")) {
15
- * // if the enter key or space key are pressed, do some action
16
- * }
17
- *
18
- * if (keyboard.andPressed("ControlLeft", "KeyC")) {
19
- * // if the left control key and the letter C key are pressed, do some action
20
- * }
21
- * ```
22
- */
23
- export declare class KeyboardController {
24
- /**
25
- * The current pressed keys
26
- * @readonly
27
- */
28
- readonly pressedKeys: string[];
29
- private keyMap;
30
- /** @private */
31
- constructor(canvas: HTMLCanvasElement);
32
- private eventHandler;
33
- /**
34
- * Returns TRUE if the given key is being pressed.
35
- * @see [KeyboardEvent: code property](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
36
- * @param keyCode The code of the key to check
37
- * @returns TRUE true for pressed, FALSE instead
38
- */
39
- isPressed(keyCode: string): boolean;
40
- /**
41
- * Returns TRUE if one of the given keys is being pressed.
42
- * @see [KeyboardEvent: code property](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
43
- * @param keyCodes The codes of the keys to check
44
- * @returns TRUE for pressed, FALSE instead
45
- */
46
- orPressed(keyCodes: string[]): boolean;
47
- /**
48
- * Returns TRUE if all the given keys are being pressed.
49
- * @see [KeyboardEvent: code property](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
50
- * @param keyCodes The codes of the keys to check
51
- * @returns TRUE for pressed, FALSE instead
52
- */
53
- andPressed(keyCodes: string[]): boolean;
54
- /**
55
- * This method accepts two parameters that will be returned depending on whether the key is pressed or not.
56
- * @see [KeyboardEvent: code property](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
57
- * @param keyCode The code of the key to check
58
- * @param returnTrue The value to return if the key is pressed
59
- * @param returnFalse The value to return if the key is not pressed
60
- * @returns The returnTrue for pressed or the returnFalse instead
61
- */
62
- isPressedReturn<T>(keyCode: string, returnTrue: T, returnFalse: T): T;
63
- /**
64
- * This method accepts two parameters that will be returned depending on whether one of the given keys is being pressed.
65
- * @see [KeyboardEvent: code property](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
66
- * @param keyCodes The codes of the keys to check
67
- * @param returnTrue The value to return if the key is pressed
68
- * @param returnFalse The value to return if the key is not pressed
69
- * @returns The returnTrue for pressed or the returnFalse instead
70
- */
71
- orPressedReturn<T>(keyCodes: string[], returnTrue: T, returnFalse: T): T;
72
- /**
73
- * This method accepts two parameters that will be returned depending on whether all the given keys are being pressed.
74
- * @see [KeyboardEvent: code property](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code)
75
- * @param keyCodes The codes of the keys to check
76
- * @param returnTrue The value to return if the key is pressed
77
- * @param returnFalse The value to return if the key is not pressed
78
- * @returns The returnTrue for pressed or the returnFalse instead
79
- */
80
- andPressedReturn<T>(keyCodes: string[], returnTrue: T, returnFalse: T): T;
81
- }
@@ -1,56 +0,0 @@
1
- import { Vector2 } from "angry-pixel-math";
2
- /**
3
- * Manages mouse interaction
4
- * @public
5
- * @category Input
6
- * @example
7
- * ```js
8
- * const mouse = this.inputManager.mouse;
9
- *
10
- * if (mouse.positionInViewport.y < 0 && mouse.leftButtonPressed()) {
11
- * // if the mouse pointer is below the middle of the screen and left click, do something
12
- * }
13
- * ```
14
- */
15
- export declare class MouseController {
16
- private _leftButtonPressed;
17
- private _scrollButtonPressed;
18
- private _rightButtonPressed;
19
- private _positionInViewport;
20
- private _hasMoved;
21
- private lastPositionInViewport;
22
- private canvas;
23
- /** @private */
24
- constructor(canvas: HTMLCanvasElement);
25
- /**
26
- * TRUE if the left button is being pressed
27
- * @readonly
28
- */
29
- get leftButtonPressed(): boolean;
30
- /**
31
- * TRUE if the scroll button is being pressed
32
- * @readonly
33
- */
34
- get scrollButtonPressed(): boolean;
35
- /**
36
- * TRUE if the right button is beign pressed
37
- * @readonly
38
- */
39
- get rightButtonPressed(): boolean;
40
- /**
41
- * The position of the pointer in the screen view port
42
- * @readonly
43
- */
44
- get positionInViewport(): Vector2;
45
- /**
46
- * TRUE if the mouse moved during the last frame
47
- * @readonly
48
- */
49
- get hasMoved(): boolean;
50
- /** @private */
51
- update(): void;
52
- private setup;
53
- private updateButtonDown;
54
- private updateButtonUp;
55
- private updatePosition;
56
- }
@@ -1,45 +0,0 @@
1
- import { Vector2 } from "angry-pixel-math";
2
- /**
3
- * The information about one interaction with the screen
4
- * @public
5
- * @category Input
6
- */
7
- export interface TouchInteraction {
8
- /** The interaction position on the screen */
9
- positionInViewport: Vector2;
10
- /** The area of the interaction represented as a radius of the ellipse */
11
- radius: Vector2;
12
- }
13
- /**
14
- * Manages the touch screen interaction.
15
- * @public
16
- * @category Input
17
- * @example
18
- * ```js
19
- * const touch = this.inputController.touch;
20
- *
21
- * if (touch.touching) {
22
- * const interaction = touch.interactions[0];
23
- * }
24
- *
25
- * ```
26
- */
27
- export declare class TouchController {
28
- private canvas;
29
- private _touching;
30
- private _interactions;
31
- /** @private */
32
- constructor(canvas: HTMLCanvasElement);
33
- /**
34
- * TRUE if there is an interaction with the screen
35
- * @readonly
36
- */
37
- get touching(): boolean;
38
- /**
39
- * The information about the interactions with the screen
40
- * @readonly
41
- */
42
- get interactions(): TouchInteraction[];
43
- private eventHandler;
44
- private updatePosition;
45
- }
@@ -1,13 +0,0 @@
1
- type constructor = () => unknown;
2
- /** @private */
3
- export declare class Container {
4
- private instances;
5
- private constructors;
6
- private constants;
7
- add(name: string, constructor: constructor): void;
8
- getSingleton<T>(name: string): T;
9
- getTranscient<T>(name: string): T;
10
- addConstant(name: string, value: unknown): void;
11
- getConstant<T>(name: string): T;
12
- }
13
- export {};
@@ -1,5 +0,0 @@
1
- export declare const exceptionName = "AngryPixelException";
2
- /** @private */
3
- export declare class Exception extends Error {
4
- constructor(message: string);
5
- }
@@ -1 +0,0 @@
1
- export declare const uuid: () => string;
package/typedoc.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "$schema": "https://typedoc.org/schema.json",
3
- "name": "Angry Pixel Engine",
4
- "entryPoints": ["./src/index.ts"],
5
- "out": "api-docs",
6
- "excludePrivate": true,
7
- "excludeInternal": true,
8
- "navigation": {
9
- "includeCategories": true
10
- },
11
- "categoryOrder": ["Core", "Components", "Managers", "Game Objects", "Input"],
12
- "defaultCategory": "Core"
13
- }