فهرست منبع

MeshFaceMaterial: Added visible property.

Mr.doob 10 سال پیش
والد
کامیت
43c508725b
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      src/materials/MeshFaceMaterial.js

+ 6 - 0
src/materials/MeshFaceMaterial.js

@@ -10,6 +10,8 @@ THREE.MeshFaceMaterial = function ( materials ) {
 
 	this.materials = materials instanceof Array ? materials : [];
 
+	this.visible = true;
+
 };
 
 THREE.MeshFaceMaterial.prototype = {
@@ -35,6 +37,8 @@ THREE.MeshFaceMaterial.prototype = {
 
 		}
 
+		output.visible = this.visible;
+
 		return output;
 
 	},
@@ -49,6 +53,8 @@ THREE.MeshFaceMaterial.prototype = {
 
 		}
 
+		material.visible = this.visible;
+
 		return material;
 
 	}