소스 검색

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 );
 
 	};