|
@@ -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;
|