|
@@ -5,9 +5,13 @@ import { UniformsUtils } from '../renderers/shaders/UniformsUtils';
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author mrdoob / http://mrdoob.com/
|
|
* @author mrdoob / http://mrdoob.com/
|
|
|
|
+ *
|
|
|
|
+ * parameters = {
|
|
|
|
+ * opacity: <float>
|
|
|
|
+ * }
|
|
*/
|
|
*/
|
|
|
|
|
|
-function ShadowMaterial() {
|
|
|
|
|
|
+function ShadowMaterial( parameters ) {
|
|
|
|
|
|
ShaderMaterial.call( this, {
|
|
ShaderMaterial.call( this, {
|
|
uniforms: UniformsUtils.merge( [
|
|
uniforms: UniformsUtils.merge( [
|
|
@@ -20,9 +24,6 @@ function ShadowMaterial() {
|
|
fragmentShader: ShaderChunk[ 'shadow_frag' ]
|
|
fragmentShader: ShaderChunk[ 'shadow_frag' ]
|
|
} );
|
|
} );
|
|
|
|
|
|
- this.lights = true;
|
|
|
|
- this.transparent = true;
|
|
|
|
-
|
|
|
|
Object.defineProperties( this, {
|
|
Object.defineProperties( this, {
|
|
opacity: {
|
|
opacity: {
|
|
enumerable: true,
|
|
enumerable: true,
|
|
@@ -35,6 +36,11 @@ function ShadowMaterial() {
|
|
}
|
|
}
|
|
} );
|
|
} );
|
|
|
|
|
|
|
|
+ this.setValues( parameters );
|
|
|
|
+
|
|
|
|
+ this.lights = true;
|
|
|
|
+ this.transparent = true;
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
ShadowMaterial.prototype = Object.create( ShaderMaterial.prototype );
|
|
ShadowMaterial.prototype = Object.create( ShaderMaterial.prototype );
|