[page:Mesh] →

# [name]

Creates a simulated lens flare that tracks a light. [name] can only be used when setting the `alpha` context parameter of [page:WebGLRenderer] to `true`.

## Code Example

`const light = new THREE.PointLight( 0xffffff, 1.5, 2000 ); const textureLoader = new THREE.TextureLoader(); const textureFlare0 = textureLoader.load( "textures/lensflare/lensflare0.png" ); const textureFlare1 = textureLoader.load( "textures/lensflare/lensflare2.png" ); const textureFlare2 = textureLoader.load( "textures/lensflare/lensflare3.png" ); const lensflare = new Lensflare(); lensflare.addElement( new LensflareElement( textureFlare0, 512, 0 ) ); lensflare.addElement( new LensflareElement( textureFlare1, 512, 0 ) ); lensflare.addElement( new LensflareElement( textureFlare2, 60, 0.6 ) ); light.add( lensflare );`

## Examples

[example:webgl_lensflares WebGL / lensflares]

## Constructor

### LensflareElement( [param:Texture texture], [param:Float size], [param:Float distance], [param:Color color] )

[page:Texture texture] - THREE.Texture to use for the flare.
[page:Float size] - (optional) size in pixels
[page:Float distance] - (optional) (0-1) from light source (0 = at light source)
[page:Color color] - (optional) the [page:Color] of the lens flare

## Properties

See the base [page:Mesh] class for common properties.

## Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/objects/Lensflare.js examples/jsm/objects/Lensflare.js]