Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LensFlareSystem

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/how_to/how_to_use_lens_flares

Hierarchy

  • LensFlareSystem

Index

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.

    see

    https://doc.babylonjs.com/how_to/how_to_use_lens_flares

    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

Properties

borderLimitSearch playground for borderLimit

borderLimit: number

Define a limit from the border the lens flare can be visible.

idSearch playground for id

id: string

Define the id of the lens flare system in the scene. (equal to name by default)

layerMaskSearch playground for layerMask

layerMask: number

Restricts the rendering of the effect to only the camera rendering this layer mask.

lensFlaresSearch playground for lensFlares

lensFlares: LensFlare[]

List of lens flares used in this system.

meshesSelectionPredicateSearch playground for meshesSelectionPredicate

meshesSelectionPredicate: (mesh: AbstractMesh) => boolean

Define a predicate which could limit the list of meshes able to occlude the effect.

Type declaration

nameSearch playground for name

name: string

Define the name of the lens flare system

viewportBorderSearch playground for viewportBorder

viewportBorder: number

Define a viewport border we do not want to see the lens flare in.

Accessors

isEnabled

  • get isEnabled(): boolean
  • set isEnabled(value: boolean): any
  • Define if the lens flare system is enabled.

    Returns boolean

  • Define if the lens flare system is enabled.

    Parameters

    • value: boolean

    Returns any

scene

  • Gets the scene

    Returns Scene

Methods

disposeSearch playground for dispose

  • dispose(): void
  • Dispose and release the lens flare with its associated resources.

    Returns void

getEmitterSearch playground for getEmitter

  • getEmitter(): any
  • 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

getEmitterPositionSearch playground for getEmitterPosition

  • 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

getSceneSearch playground for getScene

  • Get the scene the effects belongs to.

    Returns Scene

    the scene holding the lens flare system

rebuildSearch playground for rebuild

  • rebuild(): void
  • Rebuilds the lens flare system

    Returns void

serializeSearch playground for serialize

  • serialize(): any
  • Serialize the current Lens Flare System into a JSON representation.

    Returns any

    the serialized JSON

setEmitterSearch playground for setEmitter

  • setEmitter(newEmitter: any): void
  • 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

Static ParseSearch playground for Parse

  • 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

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method