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 PointLightShadow page for details.
const light = new v3d.PointLight(0xff0000, 1, 100);
light.position.set(50, 50, 50);
app.scene.add(light);
color — (optional) hexadecimal color of the light. Default is 0xffffff
(white).
intensity — (optional) numeric value of the light's strength/intensity. Default is 1
.
distance — Maximum range of the light. Default is 0 (no limit).
decay — The amount the light dims along the distance of the light. Default is 2
.
Creates a new PointLight.
See the base Light class for common properties.
If set to true
light will cast dynamic shadows. This might require tweaking to get shadows looking right. See the PointLightShadow for details. The default is false
.
The amount the light dims along the distance of the light. Default is 2
.
In context of physically-correct rendering the default value should not be changed.
When 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 distance cutoff, where it will then attenuate quickly and smoothly to 0. Inherently, cutoffs are not physically correct.
Default is 0.0
.
The light's intensity. Default is 1
.
Intensity is the luminous intensity of the light measured in candela (cd).
Changing the intensity will also change the light's power.
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 intensity.
A PointLightShadow used to calculate shadows for this light.
The lightShadow's camera is set to a PerspectiveCamera with fov of 90, aspect of 1, near clipping plane at 0.5 and far clipping plane at 500.
See the base Light class for common methods.
Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
Copies value of all the properties from the source to this PointLight.
The following puzzles work with the point lights:
For more info on how to obtain the source code of this module see this page.