Skip to content

Commit

Permalink
PointLight/SpotLight: Change default decay to 2 (#23897)
Browse files Browse the repository at this point in the history
* PointLight/SpotLight: Change default decay to 2.

* Updated screenshots.

* Updated screenshots.

* Update screenshot.

* Update screenshot.
  • Loading branch information
mrdoob authored Nov 12, 2022
1 parent 87c581c commit df4a3a9
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 4 deletions.
Binary file modified examples/screenshots/webgl_loader_md2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_materials_normalmap.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_materials_subsurface_scattering.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_mirror.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_portal.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_refraction.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/screenshots/webgl_shadowmap_pointlight.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/lights/PointLight.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand All @@ -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();

Expand Down
4 changes: 2 additions & 2 deletions src/lights/SpotLight.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

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

Expand Down

0 comments on commit df4a3a9

Please sign in to comment.