Просмотр исходного кода

Allow overrideColor to be changed after construction in SpotLightHelper

Lewy Blue 8 лет назад
Родитель
Сommit
d080a75c59
1 измененных файлов с 1 добавлено и 0 удалено
  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 ) );
 		this.cone.lookAt( vector2.sub( vector ) );
 
 
 		if ( ! this.overrideColor ) this.cone.material.color.copy( this.light.color );
 		if ( ! this.overrideColor ) this.cone.material.color.copy( this.light.color );
+		else this.cone.material.color.set( this.overrideColor );
 
 
 	};
 	};
 
 

粤ICP备19079148号