瀏覽代碼

remove unused properties and getter for specularmap

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

+ 7 - 6
examples/js/loaders/GLTFLoader.js

@@ -707,11 +707,7 @@ THREE.GLTFLoader = ( function () {
 		/*eslint-disable*/
 		Object.defineProperties(
 			this,
-			{
-				specularMap: {
-					get: function () { return uniforms.specularMap.value; },
-					set: function ( v ) { uniforms.specularMap.value = v; }
-				},
+			{	
 				specular: {
 					get: function () { return uniforms.specular.value; },
 					set: function ( v ) { uniforms.specular.value = v; }
@@ -743,6 +739,11 @@ THREE.GLTFLoader = ( function () {
 				}
 			}
 		);
+
+		delete this.metalness
+		delete this.roughness
+		delete this.metalnessMap
+		delete this.roughnessMap
 		/*eslint-enable*/
 
 		this.setValues( params );
@@ -756,7 +757,7 @@ THREE.GLTFLoader = ( function () {
 
 		THREE.MeshStandardMaterial.prototype.copy.call( this, source );
 		this.specularMap = source.specularMap;
-		this.specular = source.specular;
+		this.specular.copy(source.specular);
 		this.glossinessMap = source.glossinessMap;
 		this.glossiness = source.glossiness;
 		return this;