GamepadPose: orientation プロパティ
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
GamepadPose
の読み取り専用プロパティ orientation
は、Gamepad
の向きをクォータニオン値で返します。
値は、以下の値からなる Float32Array
です。
- ピッチ: X 軸のまわりの回転です。
- ヨー: Y 軸のまわりの回転です。
- ロール: Z 軸のまわりの回転です。
- w: 4 次元目 (通常は 1) です。
向きのうちヨー (y 軸のまわりの回転) は、センサーから値を最初に取得したときのヨーの初期値からの相対値です。
値
Float32Array
、もしくは VR センサーが向きデータを提供できない場合は null
です。
例
TBD
メモ:
向き { x: 0, y: 0, z: 0, w: 1 }
が「前」とみなされます。
仕様書
Specification |
---|
Gamepad Extensions # dom-gamepadpose-orientation |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
orientation |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.