vendor/GLTFExporter.js
function getMinMax(attribute, start, count) {
      var output = {
        min: new Array(attribute.itemSize).fill(Number.POSITIVE_INFINITY),
        max: new Array(attribute.itemSize).fill(Number.NEGATIVE_INFINITY)
      };

      for (var i = start; i < start + count; i++) {
        for (var a = 0; a < attribute.itemSize; a++) {
          var value = attribute.array[i * attribute.itemSize + a];
          output.min[a] = Math.min(output.min[a], value);
          output.max[a] = Math.max(output.max[a], value);
        }
      }

      return output;
    }
function getMinMax(attribute, start, count) {
      var output = {
        min: new Array(attribute.itemSize).fill(Number.POSITIVE_INFINITY),
        max: new Array(attribute.itemSize).fill(Number.NEGATIVE_INFINITY)
      };

      for (var i = start; i < start + count; i++) {
        for (var a = 0; a < attribute.itemSize; a++) {
          var value = attribute.array[i * attribute.itemSize + a];
          output.min[a] = Math.min(output.min[a], value);
          output.max[a] = Math.max(output.max[a], value);
        }
      }

      return output;
    }
function getMinMax ( attribute , start , count ) { var output = { min : new Array ( attribute . itemSize ) . fill ( Number . POSITIVE_INFINITY ) , max : new Array ( attribute . itemSize ) . fill ( Number . NEGATIVE_INFINITY ) } ; for ( var i = start ; i < start + count ; i ++ ) { for ( var a = 0 ; a < attribute . itemSize ; a ++ ) { var value = attribute . array [ i * attribute . itemSize + a ] ; output . min [ a ] = Math . min ( output . min [ a ] , value ) ; output . max [ a ] = Math . max ( output . max [ a ] , value ) ; } } return output ; }
Get the min and max vectors from the given attribute
@param  {THREE.BufferAttribute} attribute Attribute to find the min/max in range from start to start + count
@param  {Integer} start
@param  {Integer} count
@return {Object} Object containing the `min` and `max` values (As an array of attribute.itemSize components)
Get the min and max vectors from the given attribute