浏览代码

Merge pull request #13632 from looeee/FBXLoader_blender_specular_fix

FBXLoader: alphebetized material parameters
Mr.doob 7 年之前
父节点
当前提交
8cf60bfb9b
共有 1 个文件被更改,包括 20 次插入20 次删除
  1. 20 20
      examples/js/loaders/FBXLoader.js

+ 20 - 20
examples/js/loaders/FBXLoader.js

@@ -445,26 +445,6 @@
 
 			parameters.displacementScale = properties.DisplacementFactor.value;
 
-		}
-		if ( properties.ReflectionFactor ) {
-
-			parameters.reflectivity = properties.ReflectionFactor.value;
-
-		}
-		if ( properties.Specular ) {
-
-			parameters.specular = new THREE.Color().fromArray( properties.Specular.value );
-
-		} else if ( properties.SpecularColor && properties.SpecularColor.type === 'Color' ) {
-
-			// The blender exporter exports specular color here instead of in properties.Specular
-			parameters.emissive = new THREE.Color().fromArray( properties.SpecularColor.value );
-
-		}
-		if ( properties.Shininess ) {
-
-			parameters.shininess = properties.Shininess.value;
-
 		}
 		if ( properties.Emissive ) {
 
@@ -490,6 +470,26 @@
 
 			parameters.transparent = true;
 
+		}
+		if ( properties.ReflectionFactor ) {
+
+			parameters.reflectivity = properties.ReflectionFactor.value;
+
+		}
+		if ( properties.Shininess ) {
+
+			parameters.shininess = properties.Shininess.value;
+
+		}
+		if ( properties.Specular ) {
+
+			parameters.specular = new THREE.Color().fromArray( properties.Specular.value );
+
+		} else if ( properties.SpecularColor && properties.SpecularColor.type === 'Color' ) {
+
+			// The blender exporter exports specular color here instead of in properties.Specular
+			parameters.specular = new THREE.Color().fromArray( properties.SpecularColor.value );
+
 		}
 
 		connections.get( ID ).children.forEach( function ( child ) {