@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / InputSourceReader
Interface: InputSourceReader ​
Defined in: input/actions.ts:18
What the action layer reads each frame. InputSystem supplies the real one.
Methods ​
isKeyHeld() ​
ts
isKeyHeld(code): boolean;Defined in: input/actions.ts:20
A key held, by code or key, case-insensitive.
Parameters ​
| Parameter | Type |
|---|---|
code | string |
Returns ​
boolean
isMouseHeld() ​
ts
isMouseHeld(button): boolean;Defined in: input/actions.ts:21
Parameters ​
| Parameter | Type |
|---|---|
button | number |
Returns ​
boolean
mouseDelta() ​
ts
mouseDelta(): {
x: number;
y: number;
};Defined in: input/actions.ts:23
Mouse movement this frame, in pixels.
Returns ​
ts
{
x: number;
y: number;
}| Name | Type | Defined in |
|---|---|---|
x | number | input/actions.ts:23 |
y | number | input/actions.ts:23 |
gamepads() ​
ts
gamepads(): GamepadSnapshot[];Defined in: input/actions.ts:24
Returns ​
touchButton() ​
ts
touchButton(id): boolean;Defined in: input/actions.ts:25
Parameters ​
| Parameter | Type |
|---|---|
id | string |
Returns ​
boolean
touchAxis() ​
ts
touchAxis(id): {
x: number;
y: number;
};Defined in: input/actions.ts:27
stick: -1..1 with y up. look: pixels this frame, y down.
Parameters ​
| Parameter | Type |
|---|---|
id | "look" | "stick" |
Returns ​
ts
{
x: number;
y: number;
}| Name | Type | Defined in |
|---|---|---|
x | number | input/actions.ts:27 |
y | number | input/actions.ts:27 |

