src/gl/gl-attribute.js
/**
   * Given a set of program locations, set up the attribute pointers
   *
   * @chainable
   * @param  {Object} locations Map of attribute names to program locations
   *
   * @return {this} Returns `this`
   */
Given a set of program locations, set up the attribute pointers
@chainable
@param  {Object} locations Map of attribute names to program locations

@return {this} Returns `this`
Given a set of program locations set up the attribute pointers @chainable @param { Object } locations Map of attribute names to program locations @return { this } Returns ` this `
draw(locations) {
    var gl = this._gl;
    var a, s = 0;
    if(!this.glBuf) {
      this.update();
    } else {
      this.bindBuffer();
    }
    for(var i = 0; i < this.attributes.length; i++)
    {
      a = this.attributes[i];
      if(a.name in locations)
      {
        gl.enableVertexAttribArray(locations[a.name]);
        gl.vertexAttribPointer(locations[a.name], a.size, gl.FLOAT, false, this.size, s);
      }
      s += 4 * a.size;
    }
    return this; 
  }
draw ( locations ) { var gl = this . _gl ; var a , s = 0 ; if ( ! this . glBuf ) { this . update ( ) ; } else { this . bindBuffer ( ) ; } for ( var i = 0 ; i < this . attributes . length ; i ++ ) { a = this . attributes [ i ] ; if ( a . name in locations ) { gl . enableVertexAttribArray ( locations [ a . name ] ) ; gl . vertexAttribPointer ( locations [ a . name ] , a . size , gl . FLOAT , false , this . size , s ) ; } s += 4 * a . size ; } return this ; }
Given a set of program locations, set up the attribute pointers
 @chainable
 @param  {Object} locations Map of attribute names to program locations
Given a set of program locations set up the attribute pointers @chainable @param { Object } locations Map of attribute names to program locations
// I don't know if I should suppress this, but if I // don't, it generates one warning per frame. //console.warn('Program is missing attribute ' + a.name); //.unbindBuffer();  // maybe?