Explorar o código

Allow overrideColor to be changed after construction in DirectionalLightHelper

Lewy Blue %!s(int64=8) %!d(string=hai) anos
pai
achega
cf21285227
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/helpers/DirectionalLightHelper.js

+ 2 - 0
src/helpers/DirectionalLightHelper.js

@@ -75,10 +75,12 @@ DirectionalLightHelper.prototype.update = function () {
 
 		this.lightPlane.lookAt( v3 );
 		if ( ! this.overrideColor ) this.lightPlane.material.color.copy( this.light.color );
+		else this.lightPlane.material.color.set( this.overrideColor );
 
 		this.targetLine.lookAt( v3 );
 		this.targetLine.scale.z = v3.length();
 		if ( ! this.overrideColor ) this.targetLine.material.color.copy( this.light.color );
+		else this.targetLine.material.color.set( this.overrideColor );
 
 	};