Skip to content

Commit

Permalink
fix(fillJointsRadii): fix the XRFrame.fillJointsRadii method
Browse files Browse the repository at this point in the history
Summary: fillJointsRadii was broken, this change fixes that

Reviewed By: cabanier

Differential Revision:
D46528591

Privacy Context Container: L1164747

fbshipit-source-id: 456270f2101dacd8cfeaee8dc54aabd661753a74
  • Loading branch information
felixtrz authored and facebook-github-bot committed Jun 7, 2023
1 parent 2312d8c commit faf6d2b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions polyfill/CustomWebXRPolyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,12 @@ export default class CustomWebXRPolyfill extends WebXRPolyfill {
throw new TypeError('radii array size insufficient');
}
spaces.forEach((jointSpace, i) => {
const xrhand = jointSpace[XRJOINTSPACE_PRIVATE].xrhand;
const xrInputSource = xrhand[XRHAND_PRIVATE].inputSource;
const handedness = xrInputSource.handedness;
const device = this[XRFRAME_PRIVATE].device;
const poseId = device.handPoseData[handedness].poseId;
const handPose = HAND_POSES[poseId];
const jointName = jointSpace.jointName;
radii[i] = handPose[jointName].radius;
});
Expand Down

0 comments on commit faf6d2b

Please sign in to comment.