dist/claygl.es.js
function (vertices) {
        if (vertices.length > 0) {
            var min = this.min;
            var max = this.max;
            var minArr = min.array;
            var maxArr = max.array;
            vec3Copy(minArr, vertices[0]);
            vec3Copy(maxArr, vertices[0]);
            for (var i = 1; i < vertices.length; i++) {
                var vertex = vertices[i];

                if (vertex[0] < minArr[0]) { minArr[0] = vertex[0]; }
                if (vertex[1] < minArr[1]) { minArr[1] = vertex[1]; }
                if (vertex[2] < minArr[2]) { minArr[2] = vertex[2]; }

                if (vertex[0] > maxArr[0]) { maxArr[0] = vertex[0]; }
                if (vertex[1] > maxArr[1]) { maxArr[1] = vertex[1]; }
                if (vertex[2] > maxArr[2]) { maxArr[2] = vertex[2]; }
            }
            min._dirty = true;
            max._dirty = true;
        }
    }
function (vertices) {
        if (vertices.length > 0) {
            var min = this.min;
            var max = this.max;
            var minArr = min.array;
            var maxArr = max.array;
            vec3Copy(minArr, vertices[0]);
            vec3Copy(maxArr, vertices[0]);
            for (var i = 1; i < vertices.length; i++) {
                var vertex = vertices[i];

                if (vertex[0] < minArr[0]) { minArr[0] = vertex[0]; }
                if (vertex[1] < minArr[1]) { minArr[1] = vertex[1]; }
                if (vertex[2] < minArr[2]) { minArr[2] = vertex[2]; }

                if (vertex[0] > maxArr[0]) { maxArr[0] = vertex[0]; }
                if (vertex[1] > maxArr[1]) { maxArr[1] = vertex[1]; }
                if (vertex[2] > maxArr[2]) { maxArr[2] = vertex[2]; }
            }
            min._dirty = true;
            max._dirty = true;
        }
    }
function ( vertices ) { if ( vertices . length > 0 ) { var min = this . min ; var max = this . max ; var minArr = min . array ; var maxArr = max . array ; vec3Copy ( minArr , vertices [ 0 ] ) ; vec3Copy ( maxArr , vertices [ 0 ] ) ; for ( var i = 1 ; i < vertices . length ; i ++ ) { var vertex = vertices [ i ] ; if ( vertex [ 0 ] < minArr [ 0 ] ) { minArr [ 0 ] = vertex [ 0 ] ; } if ( vertex [ 1 ] < minArr [ 1 ] ) { minArr [ 1 ] = vertex [ 1 ] ; } if ( vertex [ 2 ] < minArr [ 2 ] ) { minArr [ 2 ] = vertex [ 2 ] ; } if ( vertex [ 0 ] > maxArr [ 0 ] ) { maxArr [ 0 ] = vertex [ 0 ] ; } if ( vertex [ 1 ] > maxArr [ 1 ] ) { maxArr [ 1 ] = vertex [ 1 ] ; } if ( vertex [ 2 ] > maxArr [ 2 ] ) { maxArr [ 2 ] = vertex [ 2 ] ; } } min . _dirty = true ; max . _dirty = true ; } }
Update min and max coords from a vertices array
@param  {array} vertices
Update min and max coords from a vertices array