Browse Source

PointLight/SpotLight: Change default decay to 2 (#23897)

* PointLight/SpotLight: Change default decay to 2.

* Updated screenshots.

* Updated screenshots.

* Update screenshot.

* Update screenshot.
mrdoob 2 years ago
parent
commit
df4a3a99a9

BIN
examples/screenshots/webgl_loader_md2.jpg


BIN
examples/screenshots/webgl_materials_normalmap.jpg


BIN
examples/screenshots/webgl_materials_subsurface_scattering.jpg


BIN
examples/screenshots/webgl_mirror.jpg


BIN
examples/screenshots/webgl_portal.jpg


BIN
examples/screenshots/webgl_refraction.jpg


BIN
examples/screenshots/webgl_shadowmap_pointlight.jpg


+ 2 - 2
src/lights/PointLight.js

@@ -3,7 +3,7 @@ import { PointLightShadow } from './PointLightShadow.js';
 
 class PointLight extends Light {
 
-	constructor( color, intensity, distance = 0, decay = 1 ) {
+	constructor( color, intensity, distance = 0, decay = 2 ) {
 
 		super( color, intensity );
 
@@ -12,7 +12,7 @@ class PointLight extends Light {
 		this.type = 'PointLight';
 
 		this.distance = distance;
-		this.decay = decay; // for physically correct lights, should be 2.
+		this.decay = decay;
 
 		this.shadow = new PointLightShadow();
 

+ 2 - 2
src/lights/SpotLight.js

@@ -4,7 +4,7 @@ import { Object3D } from '../core/Object3D.js';
 
 class SpotLight extends Light {
 
-	constructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 1 ) {
+	constructor( color, intensity, distance = 0, angle = Math.PI / 3, penumbra = 0, decay = 2 ) {
 
 		super( color, intensity );
 
@@ -20,7 +20,7 @@ class SpotLight extends Light {
 		this.distance = distance;
 		this.angle = angle;
 		this.penumbra = penumbra;
-		this.decay = decay; // for physically correct lights, should be 2.
+		this.decay = decay;
 
 		this.map = null;