提交 0cc76e6b 编写于 作者: W WestLangley

Set LightHelper color equal to the light color

上级 bdc43022
......@@ -76,7 +76,7 @@ DirectionalLightHelper.prototype.update = function () {
var targetLine = this.children[ 1 ];
lightPlane.lookAt( v3 );
lightPlane.material.color.copy( this.light.color ).multiplyScalar( this.light.intensity );
lightPlane.material.color.copy( this.light.color );
targetLine.lookAt( v3 );
targetLine.scale.z = v3.length();
......
......@@ -62,8 +62,8 @@ HemisphereLightHelper.prototype.update = function () {
var colors = mesh.geometry.getAttribute( 'color' );
color1.copy( this.light.color ).multiplyScalar( this.light.intensity );
color2.copy( this.light.groundColor ).multiplyScalar( this.light.intensity );
color1.copy( this.light.color );
color2.copy( this.light.groundColor );
for ( var i = 0, l = colors.count; i < l; i ++ ) {
......
......@@ -14,7 +14,7 @@ function PointLightHelper( light, sphereSize ) {
var geometry = new SphereBufferGeometry( sphereSize, 4, 2 );
var material = new MeshBasicMaterial( { wireframe: true, fog: false } );
material.color.copy( this.light.color ).multiplyScalar( this.light.intensity );
material.color.copy( this.light.color );
Mesh.call( this, geometry, material );
......@@ -57,7 +57,7 @@ PointLightHelper.prototype.dispose = function () {
PointLightHelper.prototype.update = function () {
this.material.color.copy( this.light.color ).multiplyScalar( this.light.intensity );
this.material.color.copy( this.light.color );
/*
var d = this.light.distance;
......
......@@ -81,7 +81,7 @@ SpotLightHelper.prototype.update = function () {
this.cone.lookAt( vector2.sub( vector ) );
this.cone.material.color.copy( this.light.color ).multiplyScalar( this.light.intensity );
this.cone.material.color.copy( this.light.color );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册