src/loaders/OBJLoader2.js
function ( arrayBuffer ) {
		if ( this.logging.enabled ) console.time( 'OBJLoader2.Parser.parse' );
		this.configure();

		var arrayBufferView = new Uint8Array( arrayBuffer );
		this.contentRef = arrayBufferView;
		var length = arrayBufferView.byteLength;
		this.globalCounts.totalBytes = length;
		var buffer = new Array( 128 );

		for ( var code, word = '', bufferPointer = 0, slashesCount = 0, i = 0; i < length; i++ ) {

			code = arrayBufferView[ i ];
			switch ( code ) {
				// space
				case 32:
					if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
					word = '';
					break;
				// slash
				case 47:
					if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
					slashesCount++;
					word = '';
					break;

				// LF
				case 10:
					if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
					word = '';
					this.globalCounts.lineByte = this.globalCounts.currentByte;
					this.globalCounts.currentByte = i;
					this.processLine( buffer, bufferPointer, slashesCount );
					bufferPointer = 0;
					slashesCount = 0;
					break;

				// CR
				case 13:
					break;

				default:
					word += String.fromCharCode( code );
					break;
			}
		}
		this.finalizeParsing();
		if ( this.logging.enabled ) console.timeEnd(  'OBJLoader2.Parser.parse' );
	}
function ( arrayBuffer ) {
		if ( this.logging.enabled ) console.time( 'OBJLoader2.Parser.parse' );
		this.configure();

		var arrayBufferView = new Uint8Array( arrayBuffer );
		this.contentRef = arrayBufferView;
		var length = arrayBufferView.byteLength;
		this.globalCounts.totalBytes = length;
		var buffer = new Array( 128 );

		for ( var code, word = '', bufferPointer = 0, slashesCount = 0, i = 0; i < length; i++ ) {

			code = arrayBufferView[ i ];
			switch ( code ) {
				// space
				case 32:
					if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
					word = '';
					break;
				// slash
				case 47:
					if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
					slashesCount++;
					word = '';
					break;

				// LF
				case 10:
					if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
					word = '';
					this.globalCounts.lineByte = this.globalCounts.currentByte;
					this.globalCounts.currentByte = i;
					this.processLine( buffer, bufferPointer, slashesCount );
					bufferPointer = 0;
					slashesCount = 0;
					break;

				// CR
				case 13:
					break;

				default:
					word += String.fromCharCode( code );
					break;
			}
		}
		this.finalizeParsing();
		if ( this.logging.enabled ) console.timeEnd(  'OBJLoader2.Parser.parse' );
	}
function ( arrayBuffer ) { if ( this . logging . enabled ) console . time ( 'OBJLoader2.Parser.parse' ) ; this . configure ( ) ; var arrayBufferView = new Uint8Array ( arrayBuffer ) ; this . contentRef = arrayBufferView ; var length = arrayBufferView . byteLength ; this . globalCounts . totalBytes = length ; var buffer = new Array ( 128 ) ; for ( var code , word = '' , bufferPointer = 0 , slashesCount = 0 , i = 0 ; i < length ; i ++ ) { code = arrayBufferView [ i ] ; switch ( code ) { // space case 32 : if ( word . length > 0 ) buffer [ bufferPointer ++ ] = word ; word = '' ; break ; // slash case 47 : if ( word . length > 0 ) buffer [ bufferPointer ++ ] = word ; slashesCount ++ ; word = '' ; break ; // LF case 10 : if ( word . length > 0 ) buffer [ bufferPointer ++ ] = word ; word = '' ; this . globalCounts . lineByte = this . globalCounts . currentByte ; this . globalCounts . currentByte = i ; this . processLine ( buffer , bufferPointer , slashesCount ) ; bufferPointer = 0 ; slashesCount = 0 ; break ; // CR case 13 : break ; default : word += String . fromCharCode ( code ) ; break ; } } this . finalizeParsing ( ) ; if ( this . logging . enabled ) console . timeEnd ( 'OBJLoader2.Parser.parse' ) ; }
Parse the provided arraybuffer

@param {Uint8Array} arrayBuffer OBJ data as Uint8Array
Parse the provided arraybuffer