From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/api/gamepadpose/index.html | 63 ++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 files/zh-cn/web/api/gamepadpose/index.html (limited to 'files/zh-cn/web/api/gamepadpose') diff --git a/files/zh-cn/web/api/gamepadpose/index.html b/files/zh-cn/web/api/gamepadpose/index.html new file mode 100644 index 0000000000..73d0942849 --- /dev/null +++ b/files/zh-cn/web/api/gamepadpose/index.html @@ -0,0 +1,63 @@ +--- +title: GamepadPose +slug: Web/API/GamepadPose +translation_of: Web/API/GamepadPose +--- +
{{APIRef("Gamepad API")}}{{SeeCompatTable}}
+ +

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

+ +

这个接口通过 {{domxref("Gamepad.pose")}} 属性使用。

+ +

属性

+ +
+
{{domxref("GamepadPose.hasOrientation")}} {{readonlyInline}}
+
Returns a boolean indicating whether the gamepad is capable of returning orientation information (true) or not (false).
+
{{domxref("GamepadPose.hasPosition")}} {{readonlyInline}}
+
Returns a boolean indicating whether the gamepad is capable of returning position information (true) or not (false).
+
{{domxref("GamepadPose.position")}} {{readonlyInline}}
+
Returns the position of the {{domxref("Gamepad")}} as a 3D vector.
+
{{domxref("GamepadPose.linearVelocity")}} {{readonlyInline}}
+
Returns the linear velocity of the {{domxref("Gamepad")}}, in meters per second.
+
{{domxref("GamepadPose.linearAcceleration")}} {{readonlyInline}}
+
Returns the linear acceleration of the {{domxref("Gamepad")}}, in meters per second per second.
+
{{domxref("GamepadPose.orientation")}} {{readonlyInline}}
+
Returns the orientation of the {{domxref("Gamepad")}}, as a quarternion value.
+
{{domxref("GamepadPose.angularVelocity")}} {{readonlyInline}}
+
Returns the angular velocity of the {{domxref("Gamepad")}}, in radians per second.
+
{{domxref("GamepadPose.angularAcceleration")}} {{readonlyInline}}
+
Returns the angular acceleration of the {{domxref("Gamepad")}}, in meters per second per second.
+
+ +

Examples

+ +

TBD.

+ +

Specifications

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('GamepadExtensions', '#gamepadpose-interface', 'GamepadPose')}}{{Spec2('GamepadExtensions')}}Initial definition
+ +

Browser compatibility

+ +

{{Compat("api.GamepadPose")}}

+ +

See also

+ + -- cgit v1.2.3-54-g00ecf