Browse Source

Material: Clean up.

Mr.doob 9 years ago
parent
commit
527ceee8e3
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/materials/Material.js

+ 5 - 4
src/materials/Material.js

@@ -151,10 +151,6 @@ Material.prototype = {
 		data.uuid = this.uuid;
 		data.type = this.type;
 
-		data.depthFunc = this.depthFunc;
-		data.depthTest = this.depthTest;
-		data.depthWrite = this.depthWrite;
-
 		if ( this.name !== '' ) data.name = this.name;
 
 		if ( (this.color && this.color.isColor) ) data.color = this.color.getHex();
@@ -211,6 +207,11 @@ Material.prototype = {
 
 		if ( this.opacity < 1 ) data.opacity = this.opacity;
 		if ( this.transparent === true ) data.transparent = this.transparent;
+
+		data.depthFunc = this.depthFunc;
+		data.depthTest = this.depthTest;
+		data.depthWrite = this.depthWrite;
+
 		if ( this.alphaTest > 0 ) data.alphaTest = this.alphaTest;
 		if ( this.premultipliedAlpha === true ) data.premultipliedAlpha = this.premultipliedAlpha;
 		if ( this.wireframe === true ) data.wireframe = this.wireframe;