[page:Object3D] → [page:Light] →
[name]
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 [page:LightShadow] page for details.
Example
[example:canvas_lights_pointlights lights / pointlights ]
[example:webgl_lights_pointlights lights / pointlights ]
[example:webgl_lights_pointlights2 lights / pointlights2 ]
[example:webgldeferred_animation animation ]
[example:webgl_effects_anaglyph effects / anaglyph ]
[example:webgl_geometry_text geometry / text ]
[example:webgl_lensflares lensflares ]
var light = new THREE.PointLight( 0xff0000, 1, 100 );
light.position.set( 50, 50, 50 );
scene.add( light );
Constructor
[name]( [param:Integer color], [param:Float intensity], [param:Number distance], [param:Float decay] )
[page:Integer color] - (optional) hexadecimal color of the light. Default is 0xffffff (white).
[page:Float intensity] - (optional) numeric value of the light's strength/intensity. Default is 1.
[page:Number distance] - The distance from the light where the intensity is 0.
When set to 0, then the light never stops. Default is 0.
[page:Float decay] - The amount the light dims along the distance of the light. Default is 1.
For [page:WebGLRenderer.physicallyCorrectLights physically correct] lighting, set this to 2.
Creates a new [name].
Properties
See the base [page:Light Light] class for common properties.
[property:Float decay]
The amount the light dims along the distance of the light
In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode, decay = 2 leads to physically realistic light falloff.
Default is *1*.
[property:Float distance]
If non-zero, light will attenuate linearly from maximum intensity at the light's
position down to zero at this distance from the light. Default is *0.0*.
[property:Boolean isPointLight]
Used to check whether this or derived classes are point lights. Default is *true*.
You should not change this, as it used internally for optimisation.
[property:Float power]
The light's power.
In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode, the luminous
power of the light measured in lumens. Default is *4Math.PI*.
This is directly related to the [page:.intensity intensity] in the ratio
power = intensity * 4π
and changing this will also change the intensity.
[property:LightShadow shadow]
A [page:LightShadow] used to calculate shadows for this light.
The lightShadow's [page:LightShadow.camera camera]
is set to a [page:PerspectiveCamera] with [page:PerspectiveCamera.fov fov] of 90,
[page:PerspectiveCamera.aspect aspect] of 1, [page:PerspectiveCamera.near near]
clipping plane at 0.5 and [page:PerspectiveCamera.far far] clipping plane at 500.
Methods
See the base [page:Light Light] class for common methods.
[method:PointLight copy]( [param:PointLight source] )
Copies value of all the properties from the [page:PointLight source] to this
PointLight.
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]