interface wrapperConfig {
    axisDeadZone?: number;
    buttonConfigs?: wrapperButtonConfig[];
    updateDelay?: number;
}

Properties

axisDeadZone?: number

A range in which axis values closer to zero than this are simply treated as zero Used to prevent noise from analog sticks from registering as changes when they are not being used

buttonConfigs?: wrapperButtonConfig[]

An array of wrapperButtonConfig that tell the wrapper how to respond to button changes. Array index corresponds the the index of the button the a native browser gamepad.buttons array as returned from eg: navigator.getGamepads()[0].buttons

updateDelay?: number

The (rough) delay between each update of the gamepad state in ms. A value of 0 means the gamepad state will be updated every frame