urces(frame, xrRefSpace);

        for (let source of frame.session.inputSources) {
          let gamepad = source.gamepad;
          if (gamepad) {
            if (gamepad.buttons[0].pressed) {
              let targetRayPose = frame.getPose(source.targetRaySpace, xrRefSpace);
              if (!targetRayPose) {
                continue;
              }
              let hitResult = scene.hitTest(targetRayPose.transform);
              if (!hitResult) { continue; }
              if (hitResult.node == quad1