Browse Source

Bug fix for OBJLoader.js

For vertex color, we should parse it as long as we have more than 7 elements in the line that starts with `"v "`.
Peihong 6 years ago
parent
commit
e97e6614d7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/js/loaders/OBJLoader.js

+ 1 - 1
examples/js/loaders/OBJLoader.js

@@ -459,7 +459,7 @@ THREE.OBJLoader = ( function () {
 								parseFloat( data[ 2 ] ),
 								parseFloat( data[ 3 ] )
 							);
-							if ( data.length === 8 ) {
+							if ( data.length >= 7 ) {
 
 								state.colors.push(
 									parseFloat( data[ 4 ] ),