@flare-engine/input 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +28 -0
- package/dist/index.d.mts +344 -0
- package/dist/index.d.ts +344 -0
- package/dist/index.js +595 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +541 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Grzegorz Otto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# @flare-engine/input
|
|
2
|
+
|
|
3
|
+
Pointer / touch / gesture / virtual-control / gamepad input. `InputManager` polls per frame; `Pointer` exposes primary touch with `isDown` / `justPressed` / `delta`; `GestureDetector` emits tap / swipe / pinch / long-press; data-only `VirtualJoystick` + `VirtualButton` state (RN components live in `@flare-engine/react`); `GamepadSource` + `RemapTable` cover gamepad polling and persistent rebinds.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
bun add @flare-engine/input
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { InputManager, GestureDetector, createWebGamepadSource } from '@flare-engine/input';
|
|
15
|
+
|
|
16
|
+
const input = new InputManager();
|
|
17
|
+
const gestures = new GestureDetector();
|
|
18
|
+
gestures.onSwipe.add((e) => console.log(e.direction));
|
|
19
|
+
|
|
20
|
+
input.pollGamepads(createWebGamepadSource(navigator));
|
|
21
|
+
input.update();
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
See [API spec](../../docs/design/api-specs.md#flare-engineinput--6kb-gzip) and [skill reference](../../.github/skills/flare-input/SKILL.md).
|
|
25
|
+
|
|
26
|
+
## License
|
|
27
|
+
|
|
28
|
+
MIT
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { Vec2 } from '@flare-engine/math';
|
|
2
|
+
import { Signal } from '@flare-engine/events';
|
|
3
|
+
|
|
4
|
+
/** State of a single pointer (primary touch or mouse). */
|
|
5
|
+
interface Pointer {
|
|
6
|
+
/** Current position in screen coordinates. */
|
|
7
|
+
position: Vec2;
|
|
8
|
+
/** Position delta since last frame. */
|
|
9
|
+
delta: Vec2;
|
|
10
|
+
/** Whether the pointer is currently held down. */
|
|
11
|
+
isDown: boolean;
|
|
12
|
+
/** True only on the frame the pointer was pressed. */
|
|
13
|
+
justPressed: boolean;
|
|
14
|
+
/** True only on the frame the pointer was released. */
|
|
15
|
+
justReleased: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** State of a single touch point in a multitouch scenario. */
|
|
18
|
+
interface TouchPoint {
|
|
19
|
+
/** Unique touch identifier. */
|
|
20
|
+
id: number;
|
|
21
|
+
/** Current position in screen coordinates. */
|
|
22
|
+
position: Vec2;
|
|
23
|
+
/** Whether this touch is currently active. */
|
|
24
|
+
isDown: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** Create a default pointer state. */
|
|
27
|
+
declare function createPointer(): Pointer;
|
|
28
|
+
/**
|
|
29
|
+
* Update pointer state for a new frame.
|
|
30
|
+
* Call this at the start of each frame to clear per-frame flags.
|
|
31
|
+
*/
|
|
32
|
+
declare function resetPointerFrame(pointer: Pointer): void;
|
|
33
|
+
/** Feed a pointer-down event into the pointer state. */
|
|
34
|
+
declare function pointerDown(pointer: Pointer, x: number, y: number): void;
|
|
35
|
+
/** Feed a pointer-move event into the pointer state. */
|
|
36
|
+
declare function pointerMove(pointer: Pointer, x: number, y: number): void;
|
|
37
|
+
/** Feed a pointer-up event into the pointer state. */
|
|
38
|
+
declare function pointerUp(pointer: Pointer, x: number, y: number): void;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Gamepad — poll-based state for a single connected controller.
|
|
42
|
+
*
|
|
43
|
+
* Buttons and axes are indexed against the W3C "Standard Gamepad" mapping by
|
|
44
|
+
* default. Callers can translate raw indices via `remap.ts` before feeding
|
|
45
|
+
* snapshots into `updateGamepadFromSnapshot`.
|
|
46
|
+
*/
|
|
47
|
+
/** W3C Standard Gamepad button indices. */
|
|
48
|
+
declare const GamepadButton: {
|
|
49
|
+
readonly A: 0;
|
|
50
|
+
readonly B: 1;
|
|
51
|
+
readonly X: 2;
|
|
52
|
+
readonly Y: 3;
|
|
53
|
+
readonly LB: 4;
|
|
54
|
+
readonly RB: 5;
|
|
55
|
+
readonly LT: 6;
|
|
56
|
+
readonly RT: 7;
|
|
57
|
+
readonly Back: 8;
|
|
58
|
+
readonly Start: 9;
|
|
59
|
+
readonly LS: 10;
|
|
60
|
+
readonly RS: 11;
|
|
61
|
+
readonly DpadUp: 12;
|
|
62
|
+
readonly DpadDown: 13;
|
|
63
|
+
readonly DpadLeft: 14;
|
|
64
|
+
readonly DpadRight: 15;
|
|
65
|
+
readonly Home: 16;
|
|
66
|
+
};
|
|
67
|
+
type GamepadButtonId = (typeof GamepadButton)[keyof typeof GamepadButton];
|
|
68
|
+
/** W3C Standard Gamepad axes. */
|
|
69
|
+
declare const GamepadAxis: {
|
|
70
|
+
readonly LeftX: 0;
|
|
71
|
+
readonly LeftY: 1;
|
|
72
|
+
readonly RightX: 2;
|
|
73
|
+
readonly RightY: 3;
|
|
74
|
+
};
|
|
75
|
+
type GamepadAxisId = (typeof GamepadAxis)[keyof typeof GamepadAxis];
|
|
76
|
+
interface GamepadButtonState {
|
|
77
|
+
pressed: boolean;
|
|
78
|
+
value: number;
|
|
79
|
+
/** True for exactly one frame after a press. */
|
|
80
|
+
pressedThisFrame: boolean;
|
|
81
|
+
/** True for exactly one frame after a release. */
|
|
82
|
+
releasedThisFrame: boolean;
|
|
83
|
+
}
|
|
84
|
+
interface GamepadState {
|
|
85
|
+
connected: boolean;
|
|
86
|
+
id: string;
|
|
87
|
+
index: number;
|
|
88
|
+
buttons: GamepadButtonState[];
|
|
89
|
+
axes: number[];
|
|
90
|
+
/** Monotonically increasing timestamp from the source (ms). */
|
|
91
|
+
timestamp: number;
|
|
92
|
+
}
|
|
93
|
+
/** Raw snapshot from a `GamepadSource` — values only, no derived state. */
|
|
94
|
+
interface GamepadSnapshot {
|
|
95
|
+
id: string;
|
|
96
|
+
index: number;
|
|
97
|
+
buttons: {
|
|
98
|
+
pressed: boolean;
|
|
99
|
+
value: number;
|
|
100
|
+
}[];
|
|
101
|
+
axes: number[];
|
|
102
|
+
timestamp: number;
|
|
103
|
+
}
|
|
104
|
+
declare function createGamepadState(index?: number, buttonCount?: number, axisCount?: number): GamepadState;
|
|
105
|
+
/**
|
|
106
|
+
* Apply a fresh snapshot to an existing `GamepadState` in place. Derived
|
|
107
|
+
* `pressedThisFrame` / `releasedThisFrame` flags are recomputed from the
|
|
108
|
+
* previous `pressed` value.
|
|
109
|
+
*
|
|
110
|
+
* `deadZone` in [0, 1). Values at or below are treated as 0.
|
|
111
|
+
*/
|
|
112
|
+
declare function updateGamepadFromSnapshot(state: GamepadState, snapshot: GamepadSnapshot | null, deadZone?: number): void;
|
|
113
|
+
/** Reset just the per-frame edge flags. Call when advancing a frame without a fresh snapshot. */
|
|
114
|
+
declare function resetGamepadFrame(state: GamepadState): void;
|
|
115
|
+
declare function isButtonDown(state: GamepadState, button: number): boolean;
|
|
116
|
+
declare function wasButtonPressed(state: GamepadState, button: number): boolean;
|
|
117
|
+
declare function wasButtonReleased(state: GamepadState, button: number): boolean;
|
|
118
|
+
declare function getAxis(state: GamepadState, axis: number): number;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Platform abstraction for sampling connected gamepads.
|
|
122
|
+
*
|
|
123
|
+
* `poll()` returns one snapshot per slot (typically up to 4). Unconnected
|
|
124
|
+
* slots return `null`. Implementations:
|
|
125
|
+
*
|
|
126
|
+
* - `createWebGamepadSource()` wraps the W3C `navigator.getGamepads` API.
|
|
127
|
+
* - Native implementations (e.g., `react-native-gamepad`) inject their own
|
|
128
|
+
* via the `GamepadSource` interface — the package itself ships no native deps.
|
|
129
|
+
*/
|
|
130
|
+
interface GamepadSource {
|
|
131
|
+
poll(): (GamepadSnapshot | null)[];
|
|
132
|
+
}
|
|
133
|
+
interface NavigatorLike {
|
|
134
|
+
getGamepads?: () => (WebGamepad | null)[];
|
|
135
|
+
}
|
|
136
|
+
interface WebGamepad {
|
|
137
|
+
id: string;
|
|
138
|
+
index: number;
|
|
139
|
+
connected: boolean;
|
|
140
|
+
timestamp: number;
|
|
141
|
+
buttons: readonly {
|
|
142
|
+
pressed: boolean;
|
|
143
|
+
value: number;
|
|
144
|
+
}[];
|
|
145
|
+
axes: readonly number[];
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Wrap `navigator.getGamepads()` (W3C Gamepad API). If `nav` is not supplied,
|
|
149
|
+
* uses `globalThis.navigator`. Returns an empty array when the API is absent.
|
|
150
|
+
*/
|
|
151
|
+
declare function createWebGamepadSource(nav?: NavigatorLike): GamepadSource;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Button / axis remap table.
|
|
155
|
+
*
|
|
156
|
+
* `buttons[logicalId] = physicalIndex` — to poll A, read
|
|
157
|
+
* `snapshot.buttons[table.buttons[GamepadButton.A]]`.
|
|
158
|
+
*
|
|
159
|
+
* `axes` maps logical axis id → `{ index, invert, scale }`. Most games invert
|
|
160
|
+
* Y on some controllers; `scale` supports half-range triggers.
|
|
161
|
+
*/
|
|
162
|
+
interface AxisMap {
|
|
163
|
+
index: number;
|
|
164
|
+
invert: boolean;
|
|
165
|
+
scale: number;
|
|
166
|
+
}
|
|
167
|
+
interface RemapTable {
|
|
168
|
+
buttons: number[];
|
|
169
|
+
axes: AxisMap[];
|
|
170
|
+
}
|
|
171
|
+
declare function createIdentityRemap(buttonCount?: number, axisCount?: number): RemapTable;
|
|
172
|
+
/** Apply a remap table to a raw snapshot, returning a new snapshot with logical ordering. */
|
|
173
|
+
declare function applyRemap(snapshot: GamepadSnapshot, table: RemapTable): GamepadSnapshot;
|
|
174
|
+
/**
|
|
175
|
+
* Minimal storage contract — matches `@flare-engine/storage` `StorageAdapter`,
|
|
176
|
+
* but declared locally so this package does not take a hard dep on storage.
|
|
177
|
+
*/
|
|
178
|
+
interface RemapStore {
|
|
179
|
+
get(key: string): Promise<string | null>;
|
|
180
|
+
set(key: string, value: string): Promise<void>;
|
|
181
|
+
}
|
|
182
|
+
/** Persist a remap table under the given key. Throws on invalid table shape. */
|
|
183
|
+
declare function saveRemap(store: RemapStore, key: string, table: RemapTable): Promise<void>;
|
|
184
|
+
/** Load a remap table. Returns `null` if absent or malformed. */
|
|
185
|
+
declare function loadRemap(store: RemapStore, key: string): Promise<RemapTable | null>;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* InputManager provides a polling-based input model.
|
|
189
|
+
*
|
|
190
|
+
* Call `update()` once per frame (before game logic) to snapshot input state.
|
|
191
|
+
* Feed events from the platform (RN touch/gesture handlers) via the on* methods.
|
|
192
|
+
*/
|
|
193
|
+
declare class InputManager {
|
|
194
|
+
/** Primary pointer (first touch or mouse). */
|
|
195
|
+
readonly pointer: Pointer;
|
|
196
|
+
/** All active touch points. */
|
|
197
|
+
readonly touches: TouchPoint[];
|
|
198
|
+
private _touchMap;
|
|
199
|
+
private _gamepads;
|
|
200
|
+
private _gamepadDeadZone;
|
|
201
|
+
private _gamepadRemaps;
|
|
202
|
+
/** Call once per frame to reset per-frame flags. */
|
|
203
|
+
update(): void;
|
|
204
|
+
/** Feed a touch/pointer begin event. */
|
|
205
|
+
onPointerDown(id: number, x: number, y: number): void;
|
|
206
|
+
/** Feed a touch/pointer move event. */
|
|
207
|
+
onPointerMove(id: number, x: number, y: number): void;
|
|
208
|
+
/** Feed a touch/pointer end event. */
|
|
209
|
+
onPointerUp(id: number, x: number, y: number): void;
|
|
210
|
+
/** Access the gamepad state at `index`. Allocates on first access. */
|
|
211
|
+
gamepad(index: number): GamepadState;
|
|
212
|
+
/** Dead zone in [0, 1). Axes at or below this magnitude read as 0. */
|
|
213
|
+
setGamepadDeadZone(deadZone: number): void;
|
|
214
|
+
/** Install a remap table for a specific gamepad index. Pass `null` to clear. */
|
|
215
|
+
setGamepadRemap(index: number, table: RemapTable | null): void;
|
|
216
|
+
/** Poll all gamepads from the given source, applying remap + dead zones. */
|
|
217
|
+
pollGamepads(source: GamepadSource): void;
|
|
218
|
+
private _addOrUpdateTouch;
|
|
219
|
+
private _removeTouch;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** Swipe direction. */
|
|
223
|
+
type SwipeDirection = 'left' | 'right' | 'up' | 'down';
|
|
224
|
+
/** Gesture detection configuration. */
|
|
225
|
+
interface GestureConfig {
|
|
226
|
+
/** Max time (seconds) for a tap (default 0.3). */
|
|
227
|
+
tapMaxDuration?: number;
|
|
228
|
+
/** Max distance (px) for a tap (default 20). */
|
|
229
|
+
tapMaxDistance?: number;
|
|
230
|
+
/** Min time (seconds) for a long press (default 0.5). */
|
|
231
|
+
longPressMinDuration?: number;
|
|
232
|
+
/** Min distance (px) for a swipe (default 50). */
|
|
233
|
+
swipeMinDistance?: number;
|
|
234
|
+
/** Max time (seconds) for a swipe (default 0.4). */
|
|
235
|
+
swipeMaxDuration?: number;
|
|
236
|
+
}
|
|
237
|
+
/** Swipe event data. */
|
|
238
|
+
interface SwipeEvent {
|
|
239
|
+
direction: SwipeDirection;
|
|
240
|
+
distance: number;
|
|
241
|
+
duration: number;
|
|
242
|
+
}
|
|
243
|
+
/** Pinch event data. */
|
|
244
|
+
interface PinchEvent {
|
|
245
|
+
/** Scale factor (>1 = spread, <1 = pinch). */
|
|
246
|
+
scale: number;
|
|
247
|
+
/** Center point between the two touches. */
|
|
248
|
+
center: Vec2;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* GestureDetector recognizes tap, long press, swipe, and pinch gestures
|
|
252
|
+
* from raw pointer events.
|
|
253
|
+
*/
|
|
254
|
+
declare class GestureDetector {
|
|
255
|
+
readonly onTap: Signal<Vec2>;
|
|
256
|
+
readonly onLongPress: Signal<Vec2>;
|
|
257
|
+
readonly onSwipe: Signal<SwipeEvent>;
|
|
258
|
+
readonly onPinch: Signal<PinchEvent>;
|
|
259
|
+
private tapMaxDuration;
|
|
260
|
+
private tapMaxDistance;
|
|
261
|
+
private longPressMinDuration;
|
|
262
|
+
private swipeMinDistance;
|
|
263
|
+
private swipeMaxDuration;
|
|
264
|
+
private _startPos;
|
|
265
|
+
private _startTime;
|
|
266
|
+
private _isTracking;
|
|
267
|
+
private _longPressFired;
|
|
268
|
+
private _pinchStartDistance;
|
|
269
|
+
private _pinchTouches;
|
|
270
|
+
constructor(config?: GestureConfig);
|
|
271
|
+
/** Feed a pointer-down event. */
|
|
272
|
+
pointerDown(x: number, y: number): void;
|
|
273
|
+
/** Feed a pointer-up event. */
|
|
274
|
+
pointerUp(x: number, y: number, elapsedSinceDown: number): void;
|
|
275
|
+
/**
|
|
276
|
+
* Update gesture tracking. Call each frame with dt.
|
|
277
|
+
* @param dt Delta time in seconds.
|
|
278
|
+
* @param currentX Current pointer X.
|
|
279
|
+
* @param currentY Current pointer Y.
|
|
280
|
+
*/
|
|
281
|
+
update(dt: number, currentX: number, currentY: number): void;
|
|
282
|
+
/**
|
|
283
|
+
* Feed a two-finger pinch update. Call when two touches are active.
|
|
284
|
+
* @param t1 First touch position.
|
|
285
|
+
* @param t2 Second touch position.
|
|
286
|
+
*/
|
|
287
|
+
pinchUpdate(t1: Vec2, t2: Vec2): void;
|
|
288
|
+
/** Call when pinch ends (fewer than 2 touches). */
|
|
289
|
+
pinchEnd(): void;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** Virtual joystick configuration. */
|
|
293
|
+
interface VirtualJoystickConfig {
|
|
294
|
+
/** Dead zone radius in pixels (default 10). */
|
|
295
|
+
deadZone?: number;
|
|
296
|
+
/** Maximum radius in pixels (default 50). */
|
|
297
|
+
maxRadius?: number;
|
|
298
|
+
}
|
|
299
|
+
/** Virtual joystick state — pure data, no UI. */
|
|
300
|
+
interface VirtualJoystickState {
|
|
301
|
+
/** Whether the joystick is currently being touched. */
|
|
302
|
+
active: boolean;
|
|
303
|
+
/** Normalized direction vector (-1 to 1 per axis). */
|
|
304
|
+
direction: Vec2;
|
|
305
|
+
/** Magnitude 0-1 (0 = center/dead zone, 1 = max radius). */
|
|
306
|
+
magnitude: number;
|
|
307
|
+
/** Raw offset from center in pixels. */
|
|
308
|
+
offset: Vec2;
|
|
309
|
+
}
|
|
310
|
+
/** Create a default joystick state. */
|
|
311
|
+
declare function createJoystickState(): VirtualJoystickState;
|
|
312
|
+
/**
|
|
313
|
+
* Update joystick state from a touch event.
|
|
314
|
+
*
|
|
315
|
+
* @param state The joystick state to update.
|
|
316
|
+
* @param centerX The joystick center X in screen pixels.
|
|
317
|
+
* @param centerY The joystick center Y in screen pixels.
|
|
318
|
+
* @param touchX The current touch X in screen pixels.
|
|
319
|
+
* @param touchY The current touch Y in screen pixels.
|
|
320
|
+
* @param config Joystick configuration.
|
|
321
|
+
*/
|
|
322
|
+
declare function updateJoystick(state: VirtualJoystickState, centerX: number, centerY: number, touchX: number, touchY: number, config?: VirtualJoystickConfig): void;
|
|
323
|
+
/** Reset joystick state when touch is released. */
|
|
324
|
+
declare function releaseJoystick(state: VirtualJoystickState): void;
|
|
325
|
+
|
|
326
|
+
/** Virtual button state — pure data, no UI. */
|
|
327
|
+
interface VirtualButtonState {
|
|
328
|
+
/** Whether the button is currently pressed. */
|
|
329
|
+
isPressed: boolean;
|
|
330
|
+
/** Whether the button was just pressed this frame. */
|
|
331
|
+
justPressed: boolean;
|
|
332
|
+
/** Whether the button was just released this frame. */
|
|
333
|
+
justReleased: boolean;
|
|
334
|
+
}
|
|
335
|
+
/** Create a default button state. */
|
|
336
|
+
declare function createButtonState(): VirtualButtonState;
|
|
337
|
+
/** Call at the start of each frame to reset per-frame flags. */
|
|
338
|
+
declare function resetButtonFrame(state: VirtualButtonState): void;
|
|
339
|
+
/** Call when the button is pressed. */
|
|
340
|
+
declare function pressButton(state: VirtualButtonState): void;
|
|
341
|
+
/** Call when the button is released. */
|
|
342
|
+
declare function releaseButton(state: VirtualButtonState): void;
|
|
343
|
+
|
|
344
|
+
export { type AxisMap, GamepadAxis, type GamepadAxisId, GamepadButton, type GamepadButtonId, type GamepadButtonState, type GamepadSnapshot, type GamepadSource, type GamepadState, type GestureConfig, GestureDetector, InputManager, type PinchEvent, type Pointer, type RemapStore, type RemapTable, type SwipeDirection, type SwipeEvent, type TouchPoint, type VirtualButtonState, type VirtualJoystickConfig, type VirtualJoystickState, applyRemap, createButtonState, createGamepadState, createIdentityRemap, createJoystickState, createPointer, createWebGamepadSource, getAxis, isButtonDown, loadRemap, pointerDown, pointerMove, pointerUp, pressButton, releaseButton, releaseJoystick, resetButtonFrame, resetGamepadFrame, resetPointerFrame, saveRemap, updateGamepadFromSnapshot, updateJoystick, wasButtonPressed, wasButtonReleased };
|