code: function spherical2Cartesian(phi, theta) {
    const nPhi = parseFloat(phi);
    const nTheta = parseFloat(theta);
    const phiRad = (180.0 - nPhi) * (Math.PI / 180.0);
    const thetaRad = (180.0 - nTheta) * (Math.PI / 180.0);
    return [
      Math.sin(thetaRad) * Math.cos(phiRad),
      Math.sin(thetaRad) * Math.sin(phiRad),
      Math.cos(thetaRad),
    ];
  }
docs: --------------------------------------------------------------------------