class HighlightLayer
The highlight layer Helps adding a glow effect around a mesh.
Once instantiated in a scene, simply use the pushMesh or removeMesh method to add or remove
glowy meshes to your scene.
!!! THIS REQUIRES AN ACTIVE STENCIL BUFFER ON THE CANVAS !!!
Instantiates a new highlight Layer and references it to the scene..
Name | Type | Description | |
---|---|---|---|
name | string | The name of the layer | |
scene | Scene | The scene to use the layer in | |
optional | options | IHighlightLayerOptions | Sets of none mandatory options to use with the layer (see IHighlightLayerOptions for more information) |
The neutral color used during the preparation of the glow effect.
This is black by default as the blend operation is a blend operation.
Stencil value used for glowing meshes.
Stencil value used for the other meshes in the scene.
Specifies whether or not the inner glow is ACTIVE in the layer.
Specifies whether or not the outer glow is ACTIVE in the layer.
Specifies wether the highlight layer is enabled or not.
Gets the horizontal size of the blur.
Specifies the horizontal size of the blur.
Gets the vertical size of the blur.
Specifies the vertical size of the blur.
Gets the camera attached to the layer.
An event triggered when the highlight layer has been disposed.
@type {BABYLON.Observable}
An event triggered when the highlight layer is about rendering the main texture with the glowy parts.
@type {BABYLON.Observable}
An event triggered when the highlight layer is being blurred.
@type {BABYLON.Observable}
An event triggered when the highlight layer has been blurred.
@type {BABYLON.Observable}
An event triggered when the glowing blurred texture is being merged in the scene.
@type {BABYLON.Observable}
An event triggered when the glowing blurred texture has been merged in the scene.
@type {BABYLON.Observable}
An event triggered when the highlight layer changes its size.
@type {BABYLON.Observable}
Renders the glowing part of the scene by blending the blurred glowing meshes on top of the rendered scene.
Add a mesh in the exclusion list to prevent it to impact or being impacted by the highlight layer.
Name | Type | Description | |
---|---|---|---|
mesh | Mesh | The mesh to exclude from the highlight layer |
Remove a mesh from the exclusion list to let it impact or being impacted by the highlight layer.
Name | Type | Description | |
---|---|---|---|
mesh | Mesh | The mesh to highlight |
Add a mesh in the highlight layer in order to make it glow with the chosen color.
Name | Type | Description | |
---|---|---|---|
mesh | Mesh | The mesh to highlight | |
color | Color3 | The color of the highlight | |
optional | glowEmissiveOnly | boolean | Extract the glow from the emissive texture |
Remove a mesh from the highlight layer in order to make it stop glowing.
Name | Type | Description | |
---|---|---|---|
mesh | Mesh | The mesh to highlight |
Returns true if the layer contains information to display, otherwise false.
Dispose the highlight layer and free resources.