Creates a new lens flare.
Optionallook: LensFlareLook | null = null
The look of the flare.
Optionaloptions: LensFlareOptions = {}
The source the flare follows.
Whether the flare keeps drawing while its source is outside the screen, within the edge fade band - the ghosts of a sun just outside the frame. Defaults to true.
The colour of the flare, tinting its elements. Defaults to white.
The world direction towards the source, or null. See LensFlareOptions.
The width of the band at the edge of the screen the flare fades out over as its source leaves the screen, as a fraction of half the screen size. Defaults to 0.2.
Whether the flare is drawn. Defaults to true.
The distance from the camera the flare of a positional source is fully faded out at, in world units. Defaults to 0, which disables the fade.
The distance from the camera the flare of a positional source starts to fade out at, in world units. The fade is disabled while LensFlare#fadeEnd is not greater than this. Defaults to 0.
The brightness of the flare, multiplying the intensity of its elements. Defaults to 1.
The light the flare belongs to, or null. See LensFlareOptions.
The node whose position is the source, or null. See LensFlareOptions.
The time the measured visibility takes to follow a change, in seconds, smoothing the flare as the source is covered and uncovered. Zero follows immediately. Defaults to 0.15.
The distance the depth test is moved from the source towards the camera, in world units, so that the geometry of the light itself, such as a bulb, does not occlude its own flare. Defaults to 0.
The radius around the source the scene depth is tested in to measure how much of the source is visible, as a fraction of the screen height. The flare fades with the fraction. Defaults to 0.02.
The world position of the source, or null. See LensFlareOptions.
The scale of the flare, multiplying the size of its elements. Defaults to 1.
Whether the colour of the light the flare belongs to tints the flare. Defaults to true.
Gets the look of the flare.
Sets the look of the flare. Assigning a look, the same object included, rebuilds the elements of the flare at the next CameraFrame#update, so assign it again after editing the elements in place.
A lens flare: a LensFlareLook placed in the world, following a light or a node. Create one for each light that flares, and add it to the LensFlareEffect of a camera frame. The properties of the flare are live - changes apply to the next frame rendered - except the look, whose elements are built into the effect when CameraFrame#update is called.
Example