Class LensFlareSystem
Constructors
constructor
-
Instantiates a lens flare system. This represents a Lens Flare System or the shiny effect created by the light reflection on the camera lenses. It is usually composed of several
lensFlare.Parameters
- name: string
Define the name of the lens flare system in the scene
- emitter: any
Define the source (the emitter) of the lens flares (it can be a camera, a light or a mesh).
- scene: Scene
Define the scene the lens flare system belongs to
Returns LensFlareSystem
- name: string
Properties
border Limit
Define a limit from the border the lens flare can be visible.
id
Define the id of the lens flare system in the scene. (equal to name by default)
layer Mask
Restricts the rendering of the effect to only the camera rendering this layer mask.
lens Flares
List of lens flares used in this system.
meshes Selection Predicate
Define a predicate which could limit the list of meshes able to occlude the effect.
name
Define the name of the lens flare system
viewport Border
Define a viewport border we do not want to see the lens flare in.
StaticForce GLSL
Force all the lens flare systems to compile to glsl even on WebGPU engines. False by default. This is mostly meant for backward compatibility.
Accessors
is Enabled
-
get isEnabled(): boolean
Define if the lens flare system is enabled.
Returns boolean
-
set isEnabled(value: boolean): void
Parameters
- value: boolean
Returns void
scene
-
Gets the scene
Returns Scene
shader Language
-
get shaderLanguage(): ShaderLanguage
Gets the shader language used in this system.
Returns ShaderLanguage
Methods
dispose
-
Dispose and release the lens flare with its associated resources.
Returns void
get Emitter
-
Get the emitter of the lens flare system. It defines the source of the lens flares (it can be a camera, a light or a mesh).
Returns any
the emitter of the lens flare system
get Emitter Position
-
Get the lens flare system emitter position. The emitter defines the source of the lens flares (it can be a camera, a light or a mesh).
Returns Vector3
the position
get Scene
rebuild
-
Rebuilds the lens flare system
Returns void
serialize
-
Serialize the current Lens Flare System into a JSON representation.
Returns any
the serialized JSON
set Emitter
-
Set the emitter of the lens flare system. It defines the source of the lens flares (it can be a camera, a light or a mesh).
Parameters
- newEmitter: any
Define the new emitter of the system
Returns void
- newEmitter: any
StaticParse
-
Parse a lens flare system from a JSON representation
Parameters
- parsedLensFlareSystem: any
Define the JSON to parse
- scene: Scene
Define the scene the parsed system should be instantiated in
- rootUrl: string
Define the rootUrl of the load sequence to easily find a load relative dependencies such as textures
Returns LensFlareSystem
the parsed system
- parsedLensFlareSystem: any
This represents a Lens Flare System or the shiny effect created by the light reflection on the camera lenses. It is usually composed of several
lensFlare.See
https://doc.babylonjs.com/features/featuresDeepDive/environment/lenseFlare