function setAttribInfoBufferFromArray(gl, attribInfo, array, offset) {
    array = makeTypedArray(array);
    if (offset) {
      gl.bindBuffer(gl.ARRAY_BUFFER, attribInfo.buffer);
      gl.bufferSubData(gl.ARRAY_BUFFER, offset, array);
    } else {
      setBufferFromTypedArray(gl, gl.ARRAY_BUFFER, attribInfo.buffer, array, attribInfo.drawType);
    }
  }
Sets the contents of a buffer attached to an attribInfo

This is helper function to dynamically update a buffer.

Let's say you make a bufferInfo

    var arrays = {
       position: new Float32Array([0, 0, 0, 10, 0, 0, 0, 10, 0, 10, 10, 0]),
       texcoord: new Float32Array([0, 0, 0, 1, 1, 0, 1, 1]),
       normal:   new Float32Array([0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1]),
       indices:  new Uint16Array([0, 1, 2, 1, 2, 3]),
    };
    var bufferInfo = twgl.createBufferInfoFromArrays(gl, arrays);

 And you want to dynamically upate the positions. You could do this

    // assuming arrays.position has already been updated with new data.
    twgl.setAttribInfoBufferFromArray(gl, bufferInfo.attribs.position, arrays.position);

@param {WebGLRenderingContext} gl
@param {AttribInfo} attribInfo The attribInfo who's buffer contents to set. NOTE: If you have an attribute prefix
  the name of the attribute will include the prefix.
@param {ArraySpec} array Note: it is arguably ineffient to pass in anything but a typed array because anything
   else will have to be converted to a typed array before it can be used by WebGL. During init time that
   inefficiency is usually not important but if you're updating data dynamically best to be efficient.
@param {number} [offset] an optional offset into the buffer. This is only an offset into the WebGL buffer
   not the array. To pass in an offset into the array itself use a typed array and create an `ArrayBufferView`
   for the portion of the array you want to use.

       var someArray = new Float32Array(1000); // an array with 1000 floats
       var someSubArray = new Float32Array(someArray.buffer, offsetInBytes, sizeInUnits); // a view into someArray

   Now you can pass `someSubArray` into setAttribInfoBufferFromArray`
@memberOf module:twgl/attributes