瀏覽代碼

fix semi and delete prop from source

Dusan Bosnjak 6 年之前
父節點
當前提交
2443963d23
共有 1 個文件被更改,包括 9 次插入5 次删除
  1. 9 5
      examples/js/loaders/GLTFLoader.js

+ 9 - 5
examples/js/loaders/GLTFLoader.js

@@ -740,11 +740,11 @@ THREE.GLTFLoader = ( function () {
 			}
 		);
 
-		delete this.metalness
-		delete this.roughness
-		delete this.metalnessMap
-		delete this.roughnessMap
 		/*eslint-enable*/
+		delete this.metalness;
+		delete this.roughness;
+		delete this.metalnessMap;
+		delete this.roughnessMap;
 
 		this.setValues( params );
 
@@ -757,9 +757,13 @@ THREE.GLTFLoader = ( function () {
 
 		THREE.MeshStandardMaterial.prototype.copy.call( this, source );
 		this.specularMap = source.specularMap;
-		this.specular.copy(source.specular);
+		this.specular.copy( source.specular );
 		this.glossinessMap = source.glossinessMap;
 		this.glossiness = source.glossiness;
+		delete this.metalness;
+		delete this.roughness;
+		delete this.metalnessMap;
+		delete this.roughnessMap;
 		return this;
 
 	};