Skip to content

Commit faf6d2b

Browse files
felixtrzfacebook-github-bot
authored andcommitted
fix(fillJointsRadii): fix the XRFrame.fillJointsRadii method
Summary: fillJointsRadii was broken, this change fixes that Reviewed By: cabanier Differential Revision: D46528591 Privacy Context Container: L1164747 fbshipit-source-id: 456270f2101dacd8cfeaee8dc54aabd661753a74
1 parent 2312d8c commit faf6d2b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

polyfill/CustomWebXRPolyfill.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,12 @@ export default class CustomWebXRPolyfill extends WebXRPolyfill {
327327
throw new TypeError('radii array size insufficient');
328328
}
329329
spaces.forEach((jointSpace, i) => {
330+
const xrhand = jointSpace[XRJOINTSPACE_PRIVATE].xrhand;
331+
const xrInputSource = xrhand[XRHAND_PRIVATE].inputSource;
332+
const handedness = xrInputSource.handedness;
333+
const device = this[XRFRAME_PRIVATE].device;
334+
const poseId = device.handPoseData[handedness].poseId;
335+
const handPose = HAND_POSES[poseId];
330336
const jointName = jointSpace.jointName;
331337
radii[i] = handPose[jointName].radius;
332338
});

0 commit comments

Comments
 (0)