code: function () {
          var bbox = this.boundingBox;
          if (!bbox) {
              bbox = this.boundingBox = new BoundingBox();
          }
          var posArr = this.attributes.position.value;
          if (posArr && posArr.length) {
              var min = bbox.min;
              var max = bbox.max;
              var minArr = min.array;
              var maxArr = max.array;
              vec3.set(minArr, posArr[0], posArr[1], posArr[2]);
              vec3.set(maxArr, posArr[0], posArr[1], posArr[2]);
              for (var i = 3; i < posArr.length;) {
                  var x = posArr[i++];
                  var y = posArr[i++];
                  var z = posArr[i++];
                  if (x < minArr[0]) { minArr[0] = x; }
                  if (y < minArr[1]) { minArr[1] = y; }
                  if (z < minArr[2]) { minArr[2] = z; }
  
                  if (x > maxArr[0]) { maxArr[0] = x; }
                  if (y > maxArr[1]) { maxArr[1] = y; }
                  if (z > maxArr[2]) { maxArr[2] = z; }
              }
              min._dirty = true;
              max._dirty = true;
          }
      }
docs: Update boundingBox of Geometry