 of session.inputSources) {
          let targetRayPose = frame.getPose(inputSource.targetRaySpace, refSpace);

          // We may not get a pose back in cases where the input source has lost
          // tracking or does not know where it is relative to the given frame
          // of reference.
          if (!targetRayPose) {
            continue;
          }

          if (inputSource.targetRayMode == 'tracked-pointer') {
            // If we have a pointer matrix and the pointer origin is the users
   