_box = function _box() {
                var cubeIndices = [
                  [0, 4, 2, 6], // -1, 0, 0],// -x
                  [1, 3, 5, 7], // +1, 0, 0],// +x
                  [0, 1, 4, 5], // 0, -1, 0],// -y
                  [2, 6, 3, 7], // 0, +1, 0],// +y
                  [0, 2, 1, 3], // 0, 0, -1],// -z
                  [4, 5, 6, 7] // 0, 0, +1] // +z
                ];
                //using strokeIndices instead of faces for strokes
                //to avoid diagonal stroke lines across face of box
                this.strokeIndices = [
                  [0, 1],
                  [1, 3],
                  [3, 2],
                  [6, 7],
                  [8, 9],
                  [9, 11],
                  [14, 15],
                  [16, 17],
                  [17, 19],
                  [18, 19],
                  [20, 21],
                  [22, 23]
                ];

                for (var i = 0; i < cubeIndices.length; i++) {
                  var cubeIndex = cubeIndices[i];
                  var v = i * 4;
                  for (var j = 0; j < 4; j++) {
                    var d = cubeIndex[j];
                    //inspired by lightgl:
                    //https://github.com/evanw/lightgl.js
                    //octants:https://en.wikipedia.org/wiki/Octant_(solid_geometry)
                    var octant = new _main.default.Vector(
                      ((d & 1) * 2 - 1) / 2,
                      ((d & 2) - 1) / 2,
                      ((d & 4) / 2 - 1) / 2
                    );

                    this.vertices.push(octant);
                    this.uvs.push(j & 1, (j & 2) / 2);
                  }
                  this.faces.push([v, v + 1, v + 2]);
                  this.faces.push([v + 2, v + 1, v + 3]);
                }
              }
Draw a box with given width, height and depth
@method  box
@param  {Number} [width]     width of the box
@param  {Number} [Height]    height of the box
@param  {Number} [depth]     depth of the box
@param {Integer} [detailX]  Optional number of triangle
                           subdivisions in x-dimension
@param {Integer} [detailY]  Optional number of triangle
                           subdivisions in y-dimension
@chainable
@example
<div>
<code>
// draw a spinning box
// with width, height and depth of 50
function setup() {
  createCanvas(100, 100, WEBGL);
}

function draw() {
  background(200);
  rotateX(frameCount * 0.01);
  rotateY(frameCount * 0.01);
  box(50);
}
</code>
</div>