Explorar o código

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 %!s(int64=6) %!d(string=hai) anos
pai
achega
e97e6614d7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 ] ),