src/graphics/webgl-layer.js
function(size) {
        if (this.array_size >= this.max_size) return;

        var newsize = Math.min(size, this.max_size);

        var newAttributeArray = new Float32Array(newsize * 4 * this.stride);
        var newIndexArray = new Uint16Array(6 * newsize);

        newAttributeArray.set(this._attributeArray);
        newIndexArray.set(this._indexArray);

        this._attributeArray = newAttributeArray;
        this._indexArray = newIndexArray;
        this.array_size = newsize;
    }
function(size) {
        if (this.array_size >= this.max_size) return;

        var newsize = Math.min(size, this.max_size);

        var newAttributeArray = new Float32Array(newsize * 4 * this.stride);
        var newIndexArray = new Uint16Array(6 * newsize);

        newAttributeArray.set(this._attributeArray);
        newIndexArray.set(this._indexArray);

        this._attributeArray = newAttributeArray;
        this._indexArray = newIndexArray;
        this.array_size = newsize;
    }
function ( size ) { if ( this . array_size >= this . max_size ) return ; var newsize = Math . min ( size , this . max_size ) ; var newAttributeArray = new Float32Array ( newsize * 4 * this . stride ) ; var newIndexArray = new Uint16Array ( 6 * newsize ) ; newAttributeArray . set ( this . _attributeArray ) ; newIndexArray . set ( this . _indexArray ) ; this . _attributeArray = newAttributeArray ; this . _indexArray = newIndexArray ; this . array_size = newsize ; }
increase the size of the typed arrays does so by creating a new array of that size and copying the existing one into it
increase the size of the typed arrays does so by creating a new array of that size and copying the existing one into it