Browse Source

OBJLoader: Added workaround note.

Mr.doob 9 years ago
parent
commit
6c7f000734
1 changed files with 5 additions and 2 deletions
  1. 5 2
      examples/js/loaders/OBJLoader.js

+ 5 - 2
examples/js/loaders/OBJLoader.js

@@ -430,7 +430,7 @@ THREE.OBJLoader.prototype = {
 			text = text.replace( /\r\n/g, '\n' );
 
 		}
-		
+
 		if ( text.indexOf( '\\\n' ) !== - 1) {
 
 			// join lines separated by a line continuation character (\)
@@ -585,7 +585,10 @@ THREE.OBJLoader.prototype = {
 				// or
 				// g group_name
 
-				var name = (" " + result[ 0 ].substr( 1 ).trim()).substr(1);
+				// WORKAROUND: https://bugs.chromium.org/p/v8/issues/detail?id=2869
+				// var name = result[ 0 ].substr( 1 ).trim();
+				var name = ( " " + result[ 0 ].substr( 1 ).trim() ).substr( 1 );
+
 				state.startObject( name );
 
 			} else if ( this.regexp.material_use_pattern.test( line ) ) {