Browse Source

FBXLoader: added support for float color type

Lewy Blue 7 years ago
parent
commit
a85197f120
1 changed files with 7 additions and 1 deletions
  1. 7 1
      examples/js/loaders/FBXLoader.js

+ 7 - 1
examples/js/loaders/FBXLoader.js

@@ -1589,7 +1589,7 @@
 
 
 							if ( lightAttribute.Color !== undefined ) {
 							if ( lightAttribute.Color !== undefined ) {
 
 
-								color = parseColor( lightAttribute.Color.value );
+								color = parseColor( lightAttribute.Color );
 
 
 							}
 							}
 
 
@@ -3903,6 +3903,12 @@
 
 
 	function parseColor( property ) {
 	function parseColor( property ) {
 
 
+		if ( property.type === 'Color' ) {
+
+			return new THREE.Color( property.value, property.value, property.value );
+
+		}
+
 		return new THREE.Color().fromArray( property.value );
 		return new THREE.Color().fromArray( property.value );
 
 
 	}
 	}