Capítulo 565 de 859
Creates a simulated lens flare that tracks a light.
Note that this class can only be used with WebGLRenderer. When using WebGPURenderer, use LensflareMesh.
const light = new THREE.PointLight( 0xffffff, 1.5, 2000 );
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 );
Constructor
| Signature |
|---|
new Lensflare() |
Properties
| Property | Description |
|---|---|
.frustumCulled : boolean | Overwritten to disable view-frustum culling by default. |
.isLensflare : boolean (readonly) | This flag can be used for type testing. |
.renderOrder : number | Overwritten to make sure lensflares a rendered last. |
Methods
| Method | Description |
|---|---|
.addElement( element : LensflareElement ) | Adds the given lensflare element to this instance. |
.dispose() | Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app. |