--- title: XRInputSource.handedness slug: Web/API/XRInputSource/handedness tags: - API - AR - Controller - Handedness - Input - Property - Read-only - Reference - VR - WebXR - WebXR API - WebXR Device API - XR - XRInputSource - hand - left - right translation_of: Web/API/XRInputSource/handedness ---
{{APIRef("WebXR")}}{{securecontext_header}}
{{domxref("XRInputSource")}} の handedness
読み取り専用プロパティは、WebXR 入力ソースがユーザーのどの手に関連付けられているか、またはまったく関連付けられていないかを示します。
let hand = xrInputSource.handedness;
入力コントローラーがユーザーの片方の手にあるかどうか、もしそうならどちらの手にあるかを示す {{domxref("DOMString")}}。 {{domxref("XRHandedness")}} 列挙型に由来する値は、次のいずれかです。
{{page("/ja/docs/Web/API/XRHandedness", "Values")}}
入力ソースがユーザーの手に関連付けられたデバイスでない場合(握られているか、取り付けられているか、着用されているかに関係なく)、handedness
の値は none
です。 これは、例えば、ヘッドセットに組み込まれたコントロールや、頭や体に取り付けられた入力デバイスなど、ハンドヘルドではない入力ソースを示している場合があります。
{{page("/ja/docs/Web/API/XRHandedness", "Examples")}}
仕様 | 状態 | コメント |
---|---|---|
{{SpecName('WebXR','#dom-xrinputsource-handedness','XRInputSource.handedness')}} | {{Spec2('WebXR')}} | 初期定義 |
The compatibility table in 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.
{{Compat("api.XRInputSource.handedness")}}