Class GlowLayer
Hierarchy (View Summary)
- EffectLayer
- GlowLayer
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Instantiates a new glow Layer and references it to the scene.
Parameters
- name: string
The name of the layer
Optionalscene: SceneThe scene to use the layer in
Optionaloptions: Partial<IGlowLayerOptions>Sets of none mandatory options to use with the layer (see IGlowLayerOptions for more information)
Returns GlowLayer
- name: string
Properties
on After Compose Observable
An event triggered when the generated texture has been merged in the scene.
on After Render Mesh To Effect
An event triggered after the mesh has been rendered into the effect render target.
on Before Compose Observable
An event triggered when the generated texture is being merged in the scene.
on Before Render Main Texture Observable
An event triggered when the effect layer is about rendering the main texture with the glowy parts.
on Before Render Mesh To Effect
An event triggered when the mesh is rendered into the effect render target.
on Dispose Observable
An event triggered when the effect layer has been disposed.
on Size Changed Observable
An event triggered when the effect layer changes its size.
Readonlyunique Id
The unique id of the layer
StaticDefault Blur Kernel Size
The default blur kernel size used for the glow.
StaticDefault Texture Ratio
The default texture size ratio used for the glow.
Accessors
blur Kernel Size
-
get blurKernelSize(): number
Gets the kernel size of the blur.
Returns number
-
set blurKernelSize(value: number): void
Sets the kernel size of the blur.
Parameters
- value: number
Returns void
camera
custom Emissive Color Selector
custom Emissive Texture Selector
disable Bounding Boxes From Effect Layer
-
get disableBoundingBoxesFromEffectLayer(): boolean
Specifies if the bounding boxes should be rendered normally or if they should undergo the effect of the layer
Returns boolean
-
set disableBoundingBoxesFromEffectLayer(value: boolean): void
Parameters
- value: boolean
Returns void
intensity
-
get intensity(): number
Gets the glow intensity.
Returns number
-
set intensity(value: number): void
Sets the glow intensity.
Parameters
- value: number
Returns void
is Enabled
-
get isEnabled(): boolean
Specifies whether the highlight layer is enabled or not.
Returns boolean
-
set isEnabled(value: boolean): void
Parameters
- value: boolean
Returns void
main Texture
-
Gets the main texture where the effect is rendered
Returns RenderTargetTexture
name
-
get name(): string
The name of the layer
Returns string
-
set name(value: string): void
Parameters
- value: string
Returns void
neutral Color
rendering Group Id
-
get renderingGroupId(): number
Gets the rendering group id the layer should render in.
Returns number
-
set renderingGroupId(renderingGroupId: number): void
Parameters
- renderingGroupId: number
Returns void
shader Language
-
get shaderLanguage(): ShaderLanguage
Gets the shader language used in this material.
Returns ShaderLanguage
StaticEffect Name
-
get EffectName(): string
Effect Name of the layer.
Returns string
StaticForce GLSL
-
get ForceGLSL(): boolean
Force all the effect layers to compile to glsl even on WebGPU engines. False by default. This is mostly meant for backward compatibility.
Returns boolean
-
set ForceGLSL(value: boolean): void
Parameters
- value: boolean
Returns void
Methods
add Excluded Mesh
-
Add a mesh in the exclusion list to prevent it to impact or being impacted by the glow layer. This will not have an effect if meshes are excluded by default (see setExcludedByDefault).
Parameters
- mesh: Mesh
The mesh to exclude from the glow layer
Returns void
- mesh: Mesh
add Included Only Mesh
-
Add a mesh in the inclusion list to impact or being impacted by the glow layer.
Parameters
- mesh: Mesh
The mesh to include in the glow layer
Returns void
- mesh: Mesh
dispose
-
Dispose the highlight layer and free resources.
Returns void
get Class Name
-
Gets the class name of the effect layer
Returns string
the string with the class name of the effect layer
get Effect Intensity
-
Gets the intensity of the effect for a specific mesh.
Parameters
- mesh: AbstractMesh
The mesh to get the effect intensity for
Returns number
The intensity of the effect for the mesh
- mesh: AbstractMesh
get Effect Name
-
Get the effect name of the layer.
Returns string
The effect name
has Mesh
-
Determine if a given mesh will be used in the glow layer
Parameters
- mesh: AbstractMesh
The mesh to test
Returns boolean
true if the mesh will be highlighted by the current glow layer
- mesh: AbstractMesh
is Layer Ready
-
Checks if the layer is ready to be used.
Returns boolean
true if the layer is ready to be used
is Ready
-
Checks for the readiness of the element composing the layer.
Parameters
- subMesh: SubMesh
the mesh to check for
- useInstances: boolean
specify whether or not to use instances to render the mesh
Returns boolean
true if ready otherwise, false
- subMesh: SubMesh
need Stencil
-
Returns boolean
whether or not the layer needs stencil enabled during the mesh rendering.
reference Mesh To Use Its Own Material
-
Add a mesh to be rendered through its own material and not with emissive only.
Parameters
- mesh: AbstractMesh
The mesh for which we need to use its material
Returns void
- mesh: AbstractMesh
remove Excluded Mesh
-
Remove a mesh from the exclusion list to let it impact or being impacted by the glow layer. This will not have an effect if meshes are excluded by default (see setExcludedByDefault).
Parameters
- mesh: Mesh
The mesh to remove
Returns void
- mesh: Mesh
remove Included Only Mesh
-
Remove a mesh from the Inclusion list to prevent it to impact or being impacted by the glow layer.
Parameters
- mesh: Mesh
The mesh to remove
Returns void
- mesh: Mesh
render
-
Renders the glowing part of the scene by blending the blurred glowing meshes on top of the rendered scene.
Returns void
serialize
-
Serializes this glow layer
Returns any
a serialized glow layer object
set Effect Intensity
-
Sets the intensity of the effect for a specific mesh.
Parameters
- mesh: AbstractMesh
The mesh to set the effect intensity for
- intensity: number
The intensity of the effect for the mesh
Returns void
- mesh: AbstractMesh
set Excluded By Default
-
Set the excluded by default option. If true, all meshes will be excluded by default unless they are added to the inclusion list.
Parameters
- value: boolean
The boolean value to set the excluded by default option to
Returns void
- value: boolean
set Material For Rendering
-
Sets a specific material to be used to render a mesh/a list of meshes in the layer
Parameters
- mesh: AbstractMesh | AbstractMesh[]
mesh or array of meshes
Optionalmaterial: Materialmaterial to use by the layer when rendering the mesh(es). If undefined is passed, the specific material created by the layer will be used.
Returns void
- mesh: AbstractMesh | AbstractMesh[]
should Render
-
Returns true if the layer contains information to display, otherwise false.
Returns boolean
true if the glow layer should be rendered
un Reference Mesh From Using Its Own Material
-
Remove a mesh from being rendered through its own material and not with emissive only.
Parameters
- mesh: AbstractMesh
The mesh for which we need to not use its material
Returns void
- mesh: AbstractMesh
The glow layer Helps adding a glow effect around the emissive parts of a mesh.
Once instantiated in a scene, by default, all the emissive meshes will glow.
Documentation: https://doc.babylonjs.com/features/featuresDeepDive/mesh/glowLayer