XRJointPose

Limited availability

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

Die XRJointPose-Schnittstelle ist ein XRPose mit zusätzlichen Informationen über die Größe des Skelettgelenks, das sie darstellt.

XRPose XRJointPose

Instanzeigenschaften

XRJointPose.radius Schreibgeschützt

Der Radius (Abstand von der Haut) eines Gelenks.

Beispiele

Verwendung von XRJointPose-Objekten

Rufen Sie XRFrame.getJointPose() mit einem XRJointSpace und einem XRReferenceSpace auf, um ein XRJointPose-Objekt zu erhalten.

js
navigator.xr
  .requestSession({ optionalFeatures: ["hand-tracking"] })
  .then(/* … */);

function renderFrame(session, frame) {
  // …

  for (const inputSource of session.inputSources) {
    if (inputSource.hand) {
      const indexFingerTipJoint = inputSource.hand.get("index-finger-tip");
      frame.getJointPose(indexFingerTipJoint, referenceSpace); // XRJointPose
    }
  }
}

Spezifikationen

Specification
WebXR Hand Input Module - Level 1
# xrjointpose-interface

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
XRJointPose
radius

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support

Siehe auch