GamepadPose

实验性: 这是一项实验性技术
在将其用于生产之前,请仔细检查浏览器兼容性表格

Gamepad API的接口**GamepadPose** 表示 WebVR 的控制者在某个给定时间点的姿势, (包括方向、位置、速率、加速度信息)

这个接口通过 Gamepad.pose 属性使用。

属性

GamepadPose.hasOrientation 只读

Returns a boolean indicating whether the gamepad is capable of returning orientation information (true) or not (false).

GamepadPose.hasPosition 只读

Returns a boolean indicating whether the gamepad is capable of returning position information (true) or not (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.

Examples

TBD.

Specifications

Specification
Gamepad Extensions
# gamepadpose-interface

Browser compatibility

BCD tables only load in the browser

See also