code: function generateBufferData() {
  
  		for ( i = 0; i < tubularSegments; i ++ ) {
  
  			generateSegment( i );
  
  		}
  
  		// if the geometry is not closed, generate the last row of vertices and normals
  		// at the regular position on the given path
  		//
  		// if the geometry is closed, duplicate the first row of vertices and normals (uvs will differ)
  
  		generateSegment( ( closed === false ) ? tubularSegments : 0 );
  
  		// uvs are generated in a separate function.
  		// this makes it easy compute correct values for closed geometries
  
  		generateUVs();
  
  		// finally create faces
  
  		generateIndices();
  
  	}
docs: functions