2
0
Эх сурвалжийг харах

Merge pull request #11225 from WestLangley/dev-helper_color

Set LightHelper color equal to the light color
WestLangley 8 жил өмнө
parent
commit
e49c8ad68a

+ 1 - 1
src/helpers/DirectionalLightHelper.js

@@ -76,7 +76,7 @@ DirectionalLightHelper.prototype.update = function () {
 		var targetLine = this.children[ 1 ];
 		var targetLine = this.children[ 1 ];
 
 
 		lightPlane.lookAt( v3 );
 		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.lookAt( v3 );
 		targetLine.scale.z = v3.length();
 		targetLine.scale.z = v3.length();

+ 2 - 2
src/helpers/HemisphereLightHelper.js

@@ -62,8 +62,8 @@ HemisphereLightHelper.prototype.update = function () {
 
 
 		var colors = mesh.geometry.getAttribute( 'color' );
 		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 ++ ) {
 		for ( var i = 0, l = colors.count; i < l; i ++ ) {
 
 

+ 2 - 2
src/helpers/PointLightHelper.js

@@ -14,7 +14,7 @@ function PointLightHelper( light, sphereSize ) {
 
 
 	var geometry = new SphereBufferGeometry( sphereSize, 4, 2 );
 	var geometry = new SphereBufferGeometry( sphereSize, 4, 2 );
 	var material = new MeshBasicMaterial( { wireframe: true, fog: false } );
 	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 );
 	Mesh.call( this, geometry, material );
 
 
@@ -57,7 +57,7 @@ PointLightHelper.prototype.dispose = function () {
 
 
 PointLightHelper.prototype.update = 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;
 	var d = this.light.distance;

+ 1 - 1
src/helpers/SpotLightHelper.js

@@ -81,7 +81,7 @@ SpotLightHelper.prototype.update = function () {
 
 
 		this.cone.lookAt( vector2.sub( vector ) );
 		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 );
 
 
 	};
 	};