Optionalbuttonshow many buttons, or each one's options; one by default
Optionalcolorthe color of the controls, white by default
Optionalenabledwhether the controls are shown, device.touch by default: on a phone
or a tablet, and not on a desktop. Can be changed at any time through
GamepadPlugin#enabled.
Optionalhapticshow long the phone vibrates when a button is pressed, in milliseconds,
for the feel of a real button. 10 by default, a light tick; 0 for none.
Where the browser supports it (navigator.vibrate).
Optionalhidehide the controls while the player uses a real gamepad, and show them again when it is unplugged or the screen is touched. On by default.
Optionalindexthe gamepad slot the controls report in, 0 by default
Optionalmarginthe space kept between the controls and the edges of the viewport, in viewport pixels. A fraction of the viewport's shorter side by default.
Optionalopacityhow opaque the controls are at rest, 0.35 by default; a press doubles it
Optionalskinan already-loaded atlas for the controls' named regions. Regions are scaled to each control's size; positions and hit areas are unchanged. Omitted regions keep their shapes. Atlas colors are preserved.
Optionalstickshow many sticks (0 to 2), or each one's options; one by default
Optionalvibratelet input.vibrateGamepad vibrate the phone, where the browser can
(navigator.vibrate). On by default.
Options for GamepadPlugin.