GamepadButton.value
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2017年3月.
GamepadButton
接口下的 GamepadButton.value
属性返回一个双精浮点值来表示许多现代控制器上的模拟按钮的状态,比如说扳机键。
其值被规范于范围 0.0
— 1.0
内, 0.0
表示按钮没有被按下,1.0
则表示按钮被完全按下。