Skip to main content

InputGamepad

@zylem/game-lib


@zylem/game-lib / input / InputGamepad

Interface: InputGamepad

Defined in: packages/game-lib/src/lib/input/input.ts:22

Properties​

axes​

axes: object

Defined in: packages/game-lib/src/lib/input/input.ts:44

Horizontal​

Horizontal: AnalogState

SecondaryHorizontal​

SecondaryHorizontal: AnalogState

SecondaryVertical​

SecondaryVertical: AnalogState

Vertical​

Vertical: AnalogState


buttons​

buttons: object

Defined in: packages/game-lib/src/lib/input/input.ts:24

A​

A: ButtonState

B​

B: ButtonState

L​

L: ButtonState

R​

R: ButtonState

Select​

Select: ButtonState

Start​

Start: ButtonState

X​

X: ButtonState

Y​

Y: ButtonState


directions​

directions: object

Defined in: packages/game-lib/src/lib/input/input.ts:34

Down​

Down: ButtonState

Left​

Left: ButtonState

Right: ButtonState

Up​

Up: ButtonState


playerNumber​

playerNumber: InputPlayerNumber

Defined in: packages/game-lib/src/lib/input/input.ts:23


pointer?​

optional pointer?: object

Defined in: packages/game-lib/src/lib/input/input.ts:51

Screen-space cursor position (normalized 0..1). Only populated by MouseProvider.

centerX​

centerX: number

Canvas-center-relative X (−1 = left edge, +1 = right edge).

centerY​

centerY: number

Canvas-center-relative Y (−1 = top edge, +1 = bottom edge).

x​

x: number

Window-normalized X (0 = left, 1 = right).

y​

y: number

Window-normalized Y (0 = top, 1 = bottom).


shoulders​

shoulders: object

Defined in: packages/game-lib/src/lib/input/input.ts:40

LTrigger​

LTrigger: ButtonState

RTrigger​

RTrigger: ButtonState