src/loaders/OBJLoader2.js
function ( text ) {
		if ( this.logging.enabled ) console.time(  'OBJLoader2.Parser.parseText' );
		this.configure();
		this.legacyMode = true;
		this.contentRef = text;
		var length = text.length;
		this.globalCounts.totalBytes = length;
		var buffer = new Array( 128 );

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

			char = text[ i ];
			switch ( char ) {
				case ' ':
					if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
					word = '';
					break;

				case '/':
					if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
					slashesCount++;
					word = '';
					break;

				case '\n':
					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;

				case '\r':
					break;

				default:
					word += char;
			}
		}
		this.finalizeParsing();
		if ( this.logging.enabled ) console.timeEnd( 'OBJLoader2.Parser.parseText' );
	}
function ( text ) {
		if ( this.logging.enabled ) console.time(  'OBJLoader2.Parser.parseText' );
		this.configure();
		this.legacyMode = true;
		this.contentRef = text;
		var length = text.length;
		this.globalCounts.totalBytes = length;
		var buffer = new Array( 128 );

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

			char = text[ i ];
			switch ( char ) {
				case ' ':
					if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
					word = '';
					break;

				case '/':
					if ( word.length > 0 ) buffer[ bufferPointer++ ] = word;
					slashesCount++;
					word = '';
					break;

				case '\n':
					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;

				case '\r':
					break;

				default:
					word += char;
			}
		}
		this.finalizeParsing();
		if ( this.logging.enabled ) console.timeEnd( 'OBJLoader2.Parser.parseText' );
	}
function ( text ) { if ( this . logging . enabled ) console . time ( 'OBJLoader2.Parser.parseText' ) ; this . configure ( ) ; this . legacyMode = true ; this . contentRef = text ; var length = text . length ; this . globalCounts . totalBytes = length ; var buffer = new Array ( 128 ) ; for ( var char , word = '' , bufferPointer = 0 , slashesCount = 0 , i = 0 ; i < length ; i ++ ) { char = text [ i ] ; switch ( char ) { case ' ' : if ( word . length > 0 ) buffer [ bufferPointer ++ ] = word ; word = '' ; break ; case '/' : if ( word . length > 0 ) buffer [ bufferPointer ++ ] = word ; slashesCount ++ ; word = '' ; break ; case '\n' : 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 ; case '\r' : break ; default : word += char ; } } this . finalizeParsing ( ) ; if ( this . logging . enabled ) console . timeEnd ( 'OBJLoader2.Parser.parseText' ) ; }
Parse the provided text

@param {string} text OBJ data as string
Parse the provided text