GamepadPose
Gamepad API的接口**GamepadPose** 表示 WebVR 的控制者在某个给定时间点的姿势, (包括方向、位置、速率、加速度信息)
这个接口通过 Gamepad.pose (en-US) 属性使用。
属性
GamepadPose.hasOrientation(en-US) 只读-
Returns a boolean indicating whether the gamepad is capable of returning orientation information (
true) or not (false). GamepadPose.hasPosition(en-US) 只读-
Returns a boolean indicating whether the gamepad is capable of returning position information (
true) or not (false). GamepadPose.position(en-US) 只读-
Returns the position of the
Gamepadas a 3D vector. GamepadPose.linearVelocity(en-US) 只读-
Returns the linear velocity of the
Gamepad, in meters per second. GamepadPose.linearAcceleration(en-US) 只读-
Returns the linear acceleration of the
Gamepad, in meters per second per second. GamepadPose.orientation(en-US) 只读-
Returns the orientation of the
Gamepad, as a quarternion value. GamepadPose.angularVelocity(en-US) 只读-
Returns the angular velocity of the
Gamepad, in radians per second. GamepadPose.angularAcceleration(en-US) 只读-
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