Skip to main content

Function: resolveButton()

resolveButton(button): number

Defined in: src/interaction/GamepadInput.ts:155

Resolve a button name or index to a standard-mapping index.

Parameters​

button​

A button index, or a name in any common spelling.

string | number

Returns​

number

The index, or -1 when the name is unknown.