Browse Source

ShadowMaterial: Prevent overwriting of user values

Mugen87 8 years ago
parent
commit
8907f1df28
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/materials/ShadowMaterial.js

+ 3 - 3
src/materials/ShadowMaterial.js

@@ -24,6 +24,9 @@ function ShadowMaterial( parameters ) {
 		fragmentShader: ShaderChunk[ 'shadow_frag' ]
 	} );
 
+	this.lights = true;
+	this.transparent = true;
+
 	Object.defineProperties( this, {
 		opacity: {
 			enumerable: true,
@@ -38,9 +41,6 @@ function ShadowMaterial( parameters ) {
 
 	this.setValues( parameters );
 
-	this.lights = true;
-	this.transparent = true;
-
 }
 
 ShadowMaterial.prototype = Object.create( ShaderMaterial.prototype );