[page:Object3D] → [page:Light] →

[name]

Affects objects using [page:MeshLambertMaterial] or [page:MeshPhongMaterial].

Example

[example:canvas_lights_pointlights lights / pointlights ]
[example:webgl_lights_pointlights lights / pointlights ]
[example:webgl_lights_pointlights2 lights / pointlights2 ]
[example:webgldeferred_animation animation ]
[example:webgldeferred_pointlights pointlights ]
[example:webgl_effects_anaglyph effects / anaglyph ]
[example:webgl_geometry_large_mesh geometry / large / mesh ]
[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]([page:Integer hex], [page:Float intensity], [page:Number distance], [page:Float decay])

[page:Integer hex] — Numeric value of the RGB component of the color.
[page:Float intensity] — Numeric value of the light's strength/intensity.
[page:Number distance] -- The distance of the light where the intensity is 0. When distance is 0, then the distance is endless.
[page:Float decay] -- The amount the light dims along the distance of the light.
Creates a light at a specific position in the scene. The light shines in all directions (roughly similar to a light bulb.)

Properties

[property:Float intensity]

Light's intensity.
Default - *1.0*.

[property:Float distance]

If non-zero, light will attenuate linearly from maximum intensity at light *position* down to zero at *distance*.
Default — *0.0*.

[property:Float decay]

The amount the light dims along the distance of the light
Default — *1*.

Methods

[method:PointLight clone]()


It returns a clone of PointLight.

[method:JSON toJSON]()

Return PointLight data in JSON format.

Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]