let gp = navigator.getGamepads()[0];
if (gp.buttons[0].value > 0) {
// respond to analog button being pressed in
}GamepadButton: value property / notebook
GamepadButton: value property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.