Class GlowLayer
Hierarchy
- EffectLayer
- GlowLayer
Index
Constructors
Properties
- custom
Emissive Color Selector - custom
Emissive Texture Selector - disable
Bounding Boxes From Effect Layer - is
Enabled - name
- neutral
Color - on
After Compose Observable - on
After Render Mesh To Effect - on
Before Compose Observable - on
Before Render Main Texture Observable - on
Before Render Mesh To Effect - on
Dispose Observable - on
Size Changed Observable - Default
Blur Kernel Size - Default
Texture Ratio - Effect
Name
Accessors
Methods
Constructors
constructor
Instantiates a new glow Layer and references it to the scene.
Parameters
name: string
The name of the layer
Optional scene: Scene
The scene to use the layer in
Optional options: Partial<IGlowLayerOptions>
Sets of none mandatory options to use with the layer (see IGlowLayerOptions for more information)
Returns GlowLayer
Properties
custom Emissive Color SelectorSearch playground for customEmissiveColorSelector
custom Emissive Texture SelectorSearch playground for customEmissiveTextureSelector
disable Bounding Boxes From Effect LayerSearch playground for disableBoundingBoxesFromEffectLayer
Specifies if the bounding boxes should be rendered normally or if they should undergo the effect of the layer
is EnabledSearch playground for isEnabled
Specifies whether the highlight layer is enabled or not.
nameSearch playground for name
The name of the layer
neutral ColorSearch playground for neutralColor
The clear color of the texture used to generate the glow map.
on After Compose ObservableSearch playground for onAfterComposeObservable
An event triggered when the generated texture has been merged in the scene.
on After Render Mesh To EffectSearch playground for onAfterRenderMeshToEffect
An event triggered after the mesh has been rendered into the effect render target.
on Before Compose ObservableSearch playground for onBeforeComposeObservable
An event triggered when the generated texture is being merged in the scene.
on Before Render Main Texture ObservableSearch playground for onBeforeRenderMainTextureObservable
An event triggered when the effect layer is about rendering the main texture with the glowy parts.
on Before Render Mesh To EffectSearch playground for onBeforeRenderMeshToEffect
An event triggered when the mesh is rendered into the effect render target.
on Dispose ObservableSearch playground for onDisposeObservable
An event triggered when the effect layer has been disposed.
on Size Changed ObservableSearch playground for onSizeChangedObservable
An event triggered when the effect layer changes its size.
Static Default Blur Kernel SizeSearch playground for DefaultBlurKernelSize
The default blur kernel size used for the glow.
Static Default Texture RatioSearch playground for DefaultTextureRatio
The default texture size ratio used for the glow.
Static Readonly Effect NameSearch playground for EffectName
Effect Name of the layer.
Accessors
blur Kernel Size
Gets the kernel size of the blur.
Returns number
Sets the kernel size of the blur.
Parameters
value: number
Returns void
camera
intensity
Gets the glow intensity.
Returns number
Sets the glow intensity.
Parameters
value: number
Returns void
main Texture
Gets the main texture where the effect is rendered
Returns RenderTargetTexture
rendering Group Id
Gets the rendering group id the layer should render in.
Returns number
Gets the rendering group id the layer should render in.
Parameters
renderingGroupId: number
Returns void
Methods
add Excluded MeshSearch playground for addExcludedMesh
Add a mesh in the exclusion list to prevent it to impact or being impacted by the glow layer.
Parameters
mesh: Mesh
The mesh to exclude from the glow layer
Returns void
add Included Only MeshSearch playground for addIncludedOnlyMesh
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
disposeSearch playground for dispose
Dispose the highlight layer and free resources.
Returns void
get Class NameSearch playground for getClassName
Gets the class name of the effect layer
Returns string
the string with the class name of the effect layer
get Effect NameSearch playground for getEffectName
Get the effect name of the layer.
Returns string
The effect name
has MeshSearch playground for hasMesh
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
is ReadySearch playground for isReady
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
need StencilSearch playground for needStencil
Returns whether or not the layer needs stencil enabled during the mesh rendering.
Returns boolean
reference Mesh To Use Its Own MaterialSearch playground for referenceMeshToUseItsOwnMaterial
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
remove Excluded MeshSearch playground for removeExcludedMesh
Remove a mesh from the exclusion list to let it impact or being impacted by the glow layer.
Parameters
mesh: Mesh
The mesh to remove
Returns void
remove Included Only MeshSearch playground for removeIncludedOnlyMesh
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
renderSearch playground for render
Renders the glowing part of the scene by blending the blurred glowing meshes on top of the rendered scene.
Returns void
serializeSearch playground for serialize
Serializes this glow layer
Returns any
a serialized glow layer object
set Material For RenderingSearch playground for setMaterialForRendering
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
Optional material: Material
material 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
should RenderSearch playground for shouldRender
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 MaterialSearch playground for unReferenceMeshFromUsingItsOwnMaterial
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
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/how_to/glow_layer