index.js
function(width, height, format, type, data, genMipmaps) {
		var gl = this.gl;

		format = format || gl.RGBA;
		type = type || gl.UNSIGNED_BYTE;
		data = data || null; //make sure falsey value is null for texImage2D

		this.width = (width || width==0) ? width : this.width;
		this.height = (height || height==0) ? height : this.height;

		this._checkPOT();

		this.bind();

		gl.texImage2D(this.target, 0, format, 
					  this.width, this.height, 0, format,
					  type, data);

		if (genMipmaps)
			gl.generateMipmap(this.target);
	}
function(width, height, format, type, data, genMipmaps) {
		var gl = this.gl;

		format = format || gl.RGBA;
		type = type || gl.UNSIGNED_BYTE;
		data = data || null; //make sure falsey value is null for texImage2D

		this.width = (width || width==0) ? width : this.width;
		this.height = (height || height==0) ? height : this.height;

		this._checkPOT();

		this.bind();

		gl.texImage2D(this.target, 0, format, 
					  this.width, this.height, 0, format,
					  type, data);

		if (genMipmaps)
			gl.generateMipmap(this.target);
	}
function ( width , height , format , type , data , genMipmaps ) { var gl = this . gl ; format = format || gl . RGBA ; type = type || gl . UNSIGNED_BYTE ; data = data || null ; //make sure falsey value is null for texImage2D this . width = ( width || width == 0 ) ? width : this . width ; this . height = ( height || height == 0 ) ? height : this . height ; this . _checkPOT ( ) ; this . bind ( ) ; gl . texImage2D ( this . target , 0 , format , this . width , this . height , 0 , format , type , data ) ; if ( genMipmaps ) gl . generateMipmap ( this . target ) ; }
A low-level method to upload the specified ArrayBufferView
to this texture. This will cause the width and height of this
texture to change.

@method  uploadData
@param  {Number} width          the new width of this texture,
defaults to the last used width (or zero)
@param  {Number} height         the new height of this texture
defaults to the last used height (or zero)
@param  {GLenum} format         the data format, default RGBA
@param  {GLenum} type           the data type, default UNSIGNED_BYTE (Uint8Array)
@param  {ArrayBufferView} data  the raw data for this texture, or null for an empty image
@param  {Boolean} genMipmaps	   whether to generate mipmaps after uploading the data, default false
A low - level method to upload the specified ArrayBufferView to this texture . This will cause the width and height of this texture to change .