_ellipsoid = function _ellipsoid() {
                for (var i = 0; i <= this.detailY; i++) {
                  var v = i / this.detailY;
                  var phi = Math.PI * v - Math.PI / 2;
                  var cosPhi = Math.cos(phi);
                  var sinPhi = Math.sin(phi);

                  for (var j = 0; j <= this.detailX; j++) {
                    var u = j / this.detailX;
                    var theta = 2 * Math.PI * u;
                    var cosTheta = Math.cos(theta);
                    var sinTheta = Math.sin(theta);
                    var p = new _main.default.Vector(
                      cosPhi * sinTheta,
                      sinPhi,
                      cosPhi * cosTheta
                    );
                    this.vertices.push(p);
                    this.vertexNormals.push(p);
                    this.uvs.push(u, v);
                  }
                }
              }
Draw an ellipsoid with given radius

DetailX and detailY determine the number of subdivisions in the x-dimension and
the y-dimension of a cone. More subdivisions make the ellipsoid appear to be smoother.
Avoid detail number above 150, it may crash the browser.
@method ellipsoid
@param  {Number} [radiusx]         x-radius of ellipsoid
@param  {Number} [radiusy]         y-radius of ellipsoid
@param  {Number} [radiusz]         z-radius of ellipsoid
@param  {Integer} [detailX]        number of segments,
                                   the more segments the smoother geometry
                                   default is 24. Avoid detail number above
                                   150, it may crash the browser.
@param  {Integer} [detailY]        number of segments,
                                   the more segments the smoother geometry
                                   default is 16. Avoid detail number above
                                   150, it may crash the browser.
@chainable
@example
<div>
<code>
// draw an ellipsoid
// with radius 30, 40 and 40.
function setup() {
  createCanvas(100, 100, WEBGL);
}

function draw() {
  background(205, 105, 94);
  ellipsoid(30, 40, 40);
}
</code>
</div>

@example
<div>
<code>
// slide to see how detailX works
let detailX;
function setup() {
  createCanvas(100, 100, WEBGL);
  detailX = createSlider(2, 24, 12);
  detailX.position(10, height + 5);
  detailX.style('width', '80px');
}

function draw() {
  background(205, 105, 94);
  rotateY(millis() / 1000);
  ellipsoid(30, 40, 40, detailX.value(), 8);
}
</code>
</div>

@example
<div>
<code>
// slide to see how detailY works
let detailY;
function setup() {
  createCanvas(100, 100, WEBGL);
  detailY = createSlider(2, 24, 6);
  detailY.position(10, height + 5);
  detailY.style('width', '80px');
}

function draw() {
  background(205, 105, 9);
  rotateY(millis() / 1000);
  ellipsoid(30, 40, 40, 12, detailY.value());
}
</code>
</div>