addQuad(vertices)
    {
        let minX = this._empty ? Infinity : this.x;
        let minY = this._empty ? Infinity : this.y;
        let maxX = this._empty ? -Infinity : this.right;
        let maxY = this._empty ? -Infinity : this.bottom;

        let x = 0;
        let y = 0;

        x = vertices[0];
        y = vertices[1];
        minX = x < minX ? x : minX;
        minY = y < minY ? y : minY;
        maxX = x > maxX ? x : maxX;
        maxY = y > maxY ? y : maxY;

        x = vertices[2];
        y = vertices[3];
        minX = x < minX ? x : minX;
        minY = y < minY ? y : minY;
        maxX = x > maxX ? x : maxX;
        maxY = y > maxY ? y : maxY;

        x = vertices[4];
        y = vertices[5];
        minX = x < minX ? x : minX;
        minY = y < minY ? y : minY;
        maxX = x > maxX ? x : maxX;
        maxY = y > maxY ? y : maxY;

        x = vertices[6];
        y = vertices[7];
        minX = x < minX ? x : minX;
        minY = y < minY ? y : minY;
        maxX = x > maxX ? x : maxX;
        maxY = y > maxY ? y : maxY;

        this.x = minX;
        this.y = minY;
        this.width = maxX - this.x;
        this.height = maxY - this.y;

        this._empty = false;

        return this;
    }
/**
     * Adds the vertices of a quad to the size of this bounding box. This
     * has the effect of extending the bounding box to include this quad.
     *
     * @param {Float32Array|number[]} vertices - The vertices of the quad.
     * @return {BoundingBox} Returns itself.
     */
Adds the vertices of a quad to the size of this bounding box. This
has the effect of extending the bounding box to include this quad.

@param {Float32Array|number[]} vertices - The vertices of the quad.
@return {BoundingBox} Returns itself.
Adds the vertices of a quad to the size of this bounding box . This has the effect of extending the bounding box to include this quad . @param { Float32Array|number [] } vertices - The vertices of the quad . @return { BoundingBox } Returns itself .
addQuad(vertices)
    {
        let minX = this._empty ? Infinity : this.x;
        let minY = this._empty ? Infinity : this.y;
        let maxX = this._empty ? -Infinity : this.right;
        let maxY = this._empty ? -Infinity : this.bottom;
        let x = 0;
        let y = 0;
        x = vertices[0];
        y = vertices[1];
        minX = x < minX ? x : minX;
        minY = y < minY ? y : minY;
        maxX = x > maxX ? x : maxX;
        maxY = y > maxY ? y : maxY;
        x = vertices[2];
        y = vertices[3];
        minX = x < minX ? x : minX;
        minY = y < minY ? y : minY;
        maxX = x > maxX ? x : maxX;
        maxY = y > maxY ? y : maxY;
        x = vertices[4];
        y = vertices[5];
        minX = x < minX ? x : minX;
        minY = y < minY ? y : minY;
        maxX = x > maxX ? x : maxX;
        maxY = y > maxY ? y : maxY;
        x = vertices[6];
        y = vertices[7];
        minX = x < minX ? x : minX;
        minY = y < minY ? y : minY;
        maxX = x > maxX ? x : maxX;
        maxY = y > maxY ? y : maxY;
        this.x = minX;
        this.y = minY;
        this.width = maxX - this.x;
        this.height = maxY - this.y;
        this._empty = false;
        return this;
    }
addQuad ( vertices ) { let minX = this . _empty ? Infinity : this . x ; let minY = this . _empty ? Infinity : this . y ; let maxX = this . _empty ? - Infinity : this . right ; let maxY = this . _empty ? - Infinity : this . bottom ; let x = 0 ; let y = 0 ; x = vertices [ 0 ] ; y = vertices [ 1 ] ; minX = x < minX ? x : minX ; minY = y < minY ? y : minY ; maxX = x > maxX ? x : maxX ; maxY = y > maxY ? y : maxY ; x = vertices [ 2 ] ; y = vertices [ 3 ] ; minX = x < minX ? x : minX ; minY = y < minY ? y : minY ; maxX = x > maxX ? x : maxX ; maxY = y > maxY ? y : maxY ; x = vertices [ 4 ] ; y = vertices [ 5 ] ; minX = x < minX ? x : minX ; minY = y < minY ? y : minY ; maxX = x > maxX ? x : maxX ; maxY = y > maxY ? y : maxY ; x = vertices [ 6 ] ; y = vertices [ 7 ] ; minX = x < minX ? x : minX ; minY = y < minY ? y : minY ; maxX = x > maxX ? x : maxX ; maxY = y > maxY ? y : maxY ; this . x = minX ; this . y = minY ; this . width = maxX - this . x ; this . height = maxY - this . y ; this . _empty = false ; return this ; }
Adds the vertices of a quad to the size of this bounding box.
Adds the vertices of a quad to the size of this bounding box .