[page:Object3D] →

[name]

Creates a simulated lens flare that tracks a light.

Note: [page:WebGLRenderer] must have *alpha* set to *true* for LensFlare to work.

Example

[example:webgl_lensflares lensflares]

Constructor

[name]( [page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color] )

texture -- THREE.Texture (optional)
size -- size in pixels (-1 = use texture.width)
distance -- (0-1) from light source (0 = at light source)
blending -- [page:Materials Blending Mode] - Defaults to THREE.NormalBlending
color -- The color of the lens flare
Automatically adds a lens flare to the lensFlares array if a texture is set.

Properties

[property:array lensFlares]

The array of flares as set by [page:LensFlare.add]

[property:Vector3 positionScreen]

The position of the lens flare on the screen.

[property:Function customUpdateCallback]

A custom update callback

Methods

[method:null add]( [page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color] )

Adds a lens flare. See the constructor for details on the parameters.

[method:null updateLensFlares]()

Updates the lens flare based on the [page:LensFlare.positionScreen positionScreen] property.

[method:Lens Flare clone]()

Returns a clone of this LensFlare object and its descendants.

Source

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