Capítulo 132 de 859

Chapter 132: PointLight

Core Idea

A light that gets emitted from a single point in all directions. A common use case for this is to replicate the light emitted from a bare lightbulb.

This light can cast shadows - see the PointLightShadow for details.

Key Concepts

  • decay : number: The amount the light dims along the distance of the light. In context of physically-correct rendering the default value should not be chang…
  • distance : number: When distance is zero, light will attenuate according to inverse-square law to infinite distance. When distance is non-zero, light will att…
  • isPointLight : boolean (readonly): This flag can be used for type testing.
  • power : number: The light's power. Power is the luminous power of the light measured in lumens (lm). Changing the power will also change the light's intens…
  • shadow : PointLightShadow: This property holds the light's shadow configuration.

Code Examples

const light = new THREE.PointLight( 0xff0000, 1, 100 );
light.position.set( 50, 50, 50 );
scene.add( light );
  • What it demonstrates: Typical usage of PointLight.

Reference Tables

Constructor

Signature
`new PointLight( color : number

Properties

PropertyDescription
.decay : numberThe amount the light dims along the distance of the light. In context of physically-correct rendering the default value should not be changed.
.distance : numberWhen distance is zero, light will attenuate according to inverse-square law to infinite distance. When distance is non-zero, light will attenuate according to inverse-square law until near the distan…
.isPointLight : boolean (readonly)This flag can be used for type testing.
.power : numberThe light's power. Power is the luminous power of the light measured in lumens (lm). Changing the power will also change the light's intensity.
.shadow : PointLightShadowThis property holds the light's shadow configuration.

Key Takeaways

  1. PointLight extends: EventDispatcher → Object3D → Light
  2. Most relevant properties: decay, distance, isPointLight, power.

Connects To