files/en-us/web/api/xrjointpose/index.md
{{APIRef("WebXR Device API")}}
The XRJointPose interface is an {{domxref("XRPose")}} with additional information about the size of the skeleton joint it represents.
{{InheritanceDiagram}}
XRJointPose objectsCall {{domxref("XRFrame.getJointPose()")}} with an {{domxref("XRJointSpace")}} and an {{domxref("XRReferenceSpace")}} to get an XRJointPose object.
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
}
}
}
{{Specifications}}
{{Compat}}