Browse Source

Allow overrideColor to be changed after construction in SpotLightHelper

Lewy Blue 8 năm trước cách đây
mục cha
commit
d080a75c59
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/helpers/SpotLightHelper.js

+ 1 - 0
src/helpers/SpotLightHelper.js

@@ -86,6 +86,7 @@ SpotLightHelper.prototype.update = function () {
 		this.cone.lookAt( vector2.sub( vector ) );
 
 		if ( ! this.overrideColor ) this.cone.material.color.copy( this.light.color );
+		else this.cone.material.color.set( this.overrideColor );
 
 	};