浏览代码

make default decayExponent backwards compatible, so existing scenes are unchanged.

Ben Houston 10 年之前
父节点
当前提交
c622b5be56
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/lights/PointLight.js
  2. 1 1
      src/lights/SpotLight.js

+ 1 - 1
src/lights/PointLight.js

@@ -10,7 +10,7 @@ THREE.PointLight = function ( color, intensity, distance, decayExponent ) {
 
 	this.intensity = ( intensity !== undefined ) ? intensity : 1;
 	this.distance = ( distance !== undefined ) ? distance : 0;
-	this.decayExponent = ( decayExponent !== undefined ) ? decayExponent : 0;;	// for physically correct lights, should be 2.
+	this.decayExponent = ( decayExponent !== undefined ) ? decayExponent : 1;	// for physically correct lights, should be 2.
 
 };
 

+ 1 - 1
src/lights/SpotLight.js

@@ -15,7 +15,7 @@ THREE.SpotLight = function ( color, intensity, distance, angle, exponent, decayE
 	this.distance = ( distance !== undefined ) ? distance : 0;
 	this.angle = ( angle !== undefined ) ? angle : Math.PI / 3;
 	this.exponent = ( exponent !== undefined ) ? exponent : 10;
-	this.decayExponent = ( decayExponent !== undefined ) ? decayExponent : 0;;	// for physically correct lights, should be 2.
+	this.decayExponent = ( decayExponent !== undefined ) ? decayExponent : 1;	// for physically correct lights, should be 2.
 
 	this.castShadow = false;
 	this.onlyShadow = false;