Browse Source

Merge pull request #13416 from Mugen87/dev8

ShadowMaterial: Added .copy()
Mr.doob 7 years ago
parent
commit
e9213eb648
1 changed files with 11 additions and 5 deletions
  1. 11 5
      src/materials/ShadowMaterial.js

+ 11 - 5
src/materials/ShadowMaterial.js

@@ -2,8 +2,7 @@
  * @author mrdoob / http://mrdoob.com/
  *
  * parameters = {
- *  color: <THREE.Color>,
- *  opacity: <float>
+ *  color: <THREE.Color>
  * }
  */
 
@@ -17,9 +16,6 @@ function ShadowMaterial( parameters ) {
 	this.type = 'ShadowMaterial';
 
 	this.color = new Color( 0x000000 );
-	this.opacity = 1.0;
-
-	this.lights = true;
 	this.transparent = true;
 
 	this.setValues( parameters );
@@ -31,5 +27,15 @@ ShadowMaterial.prototype.constructor = ShadowMaterial;
 
 ShadowMaterial.prototype.isShadowMaterial = true;
 
+ShadowMaterial.prototype.copy = function ( source ) {
+
+	Material.prototype.copy.call( this, source );
+
+	this.color.copy( source.color );
+
+	return this;
+
+};
+
 
 export { ShadowMaterial };