这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

GamepadPose 接口在 手柄 API represents the pose of a WebVR controller at a given timestamp (which includes orientation, position, velocity, and acceleration information.)

This interface is accessible through the Gamepad.pose 特性。

特性

GamepadPose.hasOrientation 只读
Returns a boolean indicating whether the gamepad is capable of returning orientation information ( true ) 或不 ( false ).
GamepadPose.hasPosition 只读
Returns a boolean indicating whether the gamepad is capable of returning position information ( true ) 或不 ( false ).
GamepadPose.position 只读
Returns the position of the Gamepad as a 3D vector.
GamepadPose.linearVelocity 只读
Returns the linear velocity of the Gamepad , in meters per second.
GamepadPose.linearAcceleration 只读
Returns the linear acceleration of the Gamepad , in meters per second per second.
GamepadPose.orientation 只读
Returns the orientation of the Gamepad , as a quarternion value.
GamepadPose.angularVelocity 只读
Returns the angular velocity of the Gamepad , in radians per second.
GamepadPose.angularAcceleration 只读
Returns the angular acceleration of the Gamepad , in meters per second per second.

范例

TBD.

规范

规范 状态 注释
Gamepad Extensions
The definition of 'GamepadPose' in that specification.
编者草案 初始定义

浏览器兼容性

更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
GamepadPose Chrome No Edge 15 — 79 Firefox Yes Disabled
Yes Disabled
The flag is enabled by default in Firefox Nightly and Beta, versions 55 and above.
Disabled ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
angularAcceleration Chrome No Edge 15 — 79 Firefox Yes Disabled
Yes Disabled
The flag is enabled by default in Firefox Nightly and Beta, versions 55 and above.
Disabled ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
angularVelocity Chrome No Edge 15 — 79 Firefox Yes Disabled
Yes Disabled
The flag is enabled by default in Firefox Nightly and Beta, versions 55 and above.
Disabled ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
hasOrientation Chrome No Edge 15 — 79 Firefox Yes Disabled
Yes Disabled
The flag is enabled by default in Firefox Nightly and Beta, versions 55 and above.
Disabled ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
hasPosition Chrome No Edge 15 — 79 Firefox Yes Disabled
Yes Disabled
The flag is enabled by default in Firefox Nightly and Beta, versions 55 and above.
Disabled ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
linearAcceleration Chrome No Edge 15 — 79 Firefox Yes Disabled
Yes Disabled
The flag is enabled by default in Firefox Nightly and Beta, versions 55 and above.
Disabled ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
linearVelocity Chrome No Edge 15 — 79 Firefox Yes Disabled
Yes Disabled
The flag is enabled by default in Firefox Nightly and Beta, versions 55 and above.
Disabled ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
orientation Chrome No Edge 15 — 79 Firefox Yes Disabled
Yes Disabled
The flag is enabled by default in Firefox Nightly and Beta, versions 55 and above.
Disabled ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
位置 Chrome No Edge 15 — 79 Firefox Yes Disabled
Yes Disabled
The flag is enabled by default in Firefox Nightly and Beta, versions 55 and above.
Disabled ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No

图例

完整支持

完整支持

不支持

不支持

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

见实现注意事项。

用户必须明确启用此特征。

用户必须明确启用此特征。

另请参阅

元数据

  • 最后修改:
  1. 手柄 API
  2. GamepadPose
  3. 特性
    1. angularAcceleration
    2. angularVelocity
    3. hasOrientation
    4. hasPosition
    5. linearAcceleration
    6. linearVelocity
    7. orientation
    8. 位置
  4. Related pages for Gamepad API
    1. Gamepad
    2. GamepadButton
    3. GamepadEvent
    4. Navigator.getGamepads()
    5. Window.ongamepadconnected
    6. Window.ongamepaddisconnected

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1