Преглед на файлове

Allow overrideColor to be changed after construction in DirectionalLightHelper

Lewy Blue преди 8 години
родител
ревизия
cf21285227
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  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 );
 
 	};