Explorar o código

ShadowMaterial: Prevent overwriting of user values

Mugen87 %!s(int64=8) %!d(string=hai) anos
pai
achega
8907f1df28
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  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 );