소스 검색

Added overrideColor parameter to HemisphereLightHelper

Lewy Blue 8 년 전
부모
커밋
9c38c7f713
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/helpers/HemisphereLightHelper.js

+ 3 - 2
src/helpers/HemisphereLightHelper.js

@@ -13,7 +13,7 @@ import { BufferAttribute } from '../core/BufferAttribute';
  * @author Mugen87 / https://github.com/Mugen87
  */
 
-function HemisphereLightHelper( light, size ) {
+function HemisphereLightHelper( light, size, overrideColor ) {
 
 	Object3D.call( this );
 
@@ -26,7 +26,8 @@ function HemisphereLightHelper( light, size ) {
 	var geometry = new OctahedronBufferGeometry( size );
 	geometry.rotateY( Math.PI * 0.5 );
 
-	var material = new MeshBasicMaterial( { vertexColors: VertexColors, wireframe: true } );
+	var material = new MeshBasicMaterial( { wireframe: true, fog: false, color: this.overrideColor } );
+	if ( ! overrideColor ) material.vertexColors = VertexColors;
 
 	var position = geometry.getAttribute( 'position' );
 	var colors = new Float32Array( position.count * 3 );