GamepadPose

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Giao diện GamepadPose của Gamepad API đại diện cho tư thế của một bộ điều khiển WebVR tại một dấu thời gian cụ thể (bao gồm thông tin về hướng, vị trí, vận tốc và gia tốc).

Giao diện này có thể truy cập thông qua thuộc tính Gamepad.pose.

Thuộc tính phiên bản

GamepadPose.hasOrientation Read only Experimental

Trả về một giá trị boolean cho biết gamepad có khả năng trả về thông tin hướng (true) hay không (false).

GamepadPose.hasPosition Read only Experimental

Trả về một giá trị boolean cho biết gamepad có khả năng trả về thông tin vị trí (true) hay không (false).

GamepadPose.position Read only Experimental

Trả về vị trí của Gamepad dưới dạng vectơ 3D.

GamepadPose.linearVelocity Read only Experimental

Trả về vận tốc tuyến tính của Gamepad, tính bằng mét mỗi giây.

GamepadPose.linearAcceleration Read only Experimental

Trả về gia tốc tuyến tính của Gamepad, tính bằng mét mỗi giây bình phương.

GamepadPose.orientation Read only Experimental

Trả về hướng của Gamepad, dưới dạng giá trị quaternion.

GamepadPose.angularVelocity Read only Experimental

Trả về vận tốc góc của Gamepad, tính bằng radian mỗi giây.

GamepadPose.angularAcceleration Read only Experimental

Trả về gia tốc góc của Gamepad, tính bằng mét mỗi giây bình phương.

Ví dụ

TBD.

Thông số kỹ thuật

Specification
Gamepad Extensions
# gamepadpose-interface

Tương thích trình duyệt

Xem thêm