code: function _drawBoundingBox(min, max, color) {
          var p = new Primitive();
          p.color = toColor(color);
  
          var halfExtents = new THREE.Vector3();
          halfExtents.subVectors(max, min);
          halfExtents.multiplyScalar(0.5);
          var center = new THREE.Vector3();
          center.addVectors(max, min);
          center.multiplyScalar(0.5);
  
          var edgeCoord = [1, 1, 1];
  
          for (var i = 0; i < 4; i++) {
              for (var j = 0; j < 3; j++) {
                  var pa = new THREE.Vector3(
                      edgeCoord[0] * halfExtents.x,
                      edgeCoord[1] * halfExtents.y,
                      edgeCoord[2] * halfExtents.z);
                  pa.add(center);
  
                  var otherCoord = j % 3;
                  edgeCoord[otherCoord] = edgeCoord[otherCoord] * -1;
                  var pb = new THREE.Vector3(
                      edgeCoord[0] * halfExtents.x,
                      edgeCoord[1] * halfExtents.y,
                      edgeCoord[2] * halfExtents.z);
                  pb.add(center);
  
                  p.vertices.push(pa, pb);
              }
  
              edgeCoord = [-1, -1, -1];
  
              if (i < 3) {
                  edgeCoord[i] = edgeCoord[i] * -1;
              }
          }
  
          renderer.addPrimitive(p);
      }
docs: Draws a bounding box defined by the min/max coordinates.
  
  min/max are THREE.Vector3 objects.