提交 e6f4276c 编写于 作者: L Lewy Blue

Added overrideColor to PointLightHelper

上级 5629e8ca
......@@ -7,20 +7,24 @@ import { SphereBufferGeometry } from '../geometries/SphereGeometry';
* @author mrdoob / http://mrdoob.com/
*/
function PointLightHelper( light, sphereSize ) {
function PointLightHelper( light, sphereSize, overrideColor ) {
this.light = light;
this.light.updateMatrixWorld();
this.overrideColor = overrideColor;
var geometry = new SphereBufferGeometry( sphereSize, 4, 2 );
var material = new MeshBasicMaterial( { wireframe: true, fog: false } );
material.color.copy( this.light.color );
var material = new MeshBasicMaterial( { wireframe: true, fog: false, color: this.overrideColor } );
Mesh.call( this, geometry, material );
this.matrix = this.light.matrixWorld;
this.matrixAutoUpdate = false;
this.update();
/*
var distanceGeometry = new THREE.IcosahedronGeometry( 1, 2 );
var distanceMaterial = new THREE.MeshBasicMaterial( { color: hexColor, fog: false, wireframe: true, opacity: 0.1, transparent: true } );
......@@ -57,7 +61,7 @@ PointLightHelper.prototype.dispose = function () {
PointLightHelper.prototype.update = function () {
this.material.color.copy( this.light.color );
if ( ! this.overrideColor ) this.material.color.copy( this.light.color );
/*
var d = this.light.distance;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册