code: function updateAngles(xAngle, yAngle, zAngle) {
    let deg2rad = Math.PI / 180;
    let euler = new THREE.Euler(
      xAngle * deg2rad,
      yAngle * deg2rad,
      zAngle * deg2rad,
      'YXZ');
    let matrix = new THREE.Matrix4().makeRotationFromEuler(euler);
    camera.setRotationFromMatrix(matrix);
    if (!audioReady)
      return;
  
    if (Date.now() - lastMatrixUpdate > 100) {
      audioScene.setListenerFromMatrix(camera.matrixWorld);
    }
  }
docs: Compute rotation matrix.
  @param {Number} xAngle
  @param {Number} yAngle
  @param {Number} zAngle
  @private