Class HighlightLayer
Hierarchy
-
EffectLayer
- HighlightLayer
Index
Constructors
Properties
- disable
Bounding Boxes From Effect Layer - inner
Glow - is
Enabled - name
- neutral
Color - on
After Blur Observable - on
After Compose Observable - on
After Render Mesh ToEffect - on
Before Blur Observable - on
Before Compose Observable - on
Before Render Main Texture Observable - on
Before Render Mesh ToEffect - on
Dispose Observable - on
Size Changed Observable - outer
Glow - Effect
Name - Glowing
Mesh Stencil Reference - Neutral
Color - Normal
Mesh Stencil Reference
Accessors
Methods
Constructors
constructor
-
Instantiates a new highlight Layer and references it to the scene..
Parameters
-
name: string
The name of the layer
-
scene: Scene
The scene to use the layer in
-
Optional options: Partial<IHighlightLayerOptions>
Sets of none mandatory options to use with the layer (see IHighlightLayerOptions for more information)
Returns HighlightLayer
-
Properties
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
inner GlowSearch playground for innerGlow
Specifies whether or not the inner glow is ACTIVE in the layer.
is EnabledSearch playground for isEnabled
Specifies whether the highlight layer is enabled or not.
nameSearch playground for name
neutral ColorSearch playground for neutralColor
The clear color of the texture used to generate the glow map.
on After Blur ObservableSearch playground for onAfterBlurObservable
An event triggered when the highlight layer has been blurred.
on After Compose ObservableSearch playground for onAfterComposeObservable
An event triggered when the generated texture has been merged in the scene.
on After Render Mesh ToEffectSearch playground for onAfterRenderMeshToEffect
An event triggered after the mesh has been rendered into the effect render target.
on Before Blur ObservableSearch playground for onBeforeBlurObservable
An event triggered when the highlight layer is being blurred.
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 ToEffectSearch 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 efffect layer changes its size.
outer GlowSearch playground for outerGlow
Specifies whether or not the outer glow is ACTIVE in the layer.
Static Readonly Effect NameSearch playground for EffectName
Effect Name of the highlight layer.
Static Glowing Mesh Stencil ReferenceSearch playground for GlowingMeshStencilReference
Stencil value used for glowing meshes.
Static Neutral ColorSearch playground for NeutralColor
The neutral color used during the preparation of the glow effect. This is black by default as the blend operation is a blend operation.
Static Normal Mesh Stencil ReferenceSearch playground for NormalMeshStencilReference
Stencil value used for the other meshes in the scene.
Accessors
blur Horizontal Size
-
Gets the horizontal size of the blur.
Returns number
-
Specifies the horizontal size of the blur.
Parameters
-
value: number
Returns any
-
blur Vertical Size
-
Gets the vertical size of the blur.
Returns number
-
Specifies the vertical size of the blur.
Parameters
-
value: number
Returns any
-
camera
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 any
-
Methods
add Excluded MeshSearch playground for addExcludedMesh
-
Add a mesh in the exclusion list to prevent it to impact or being impacted by the highlight layer.
Parameters
-
mesh: Mesh
The mesh to exclude from the highlight layer
Returns void
-
add MeshSearch playground for addMesh
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 highlighted by the current HighlightLayer
Parameters
-
mesh: AbstractMesh
mesh to test
Returns boolean
true if the mesh will be highlighted by the current HighlightLayer
-
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 wether or not to use instances to render the mesh
Returns boolean
true if ready otherwise, false
-
need StencilSearch playground for needStencil
-
Returns wether or nood the layer needs stencil enabled during the mesh rendering.
Returns boolean
remove All MeshesSearch playground for removeAllMeshes
-
Remove all the meshes currently referenced in the highlight layer
Returns void
remove Excluded MeshSearch playground for removeExcludedMesh
-
Remove a mesh from the exclusion list to let it impact or being impacted by the highlight layer.
Parameters
-
mesh: Mesh
The mesh to highlight
Returns void
-
remove MeshSearch playground for removeMesh
-
Remove a mesh from the highlight layer in order to make it stop glowing.
Parameters
-
mesh: Mesh
The mesh to highlight
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 Highlight layer
Returns any
a serialized Highlight layer object
should RenderSearch playground for shouldRender
-
Returns true if the layer contains information to display, otherwise false.
Returns boolean
Static ParseSearch playground for Parse
-
Creates a Highlight layer from parsed Highlight layer data
Parameters
-
parsedHightlightLayer: any
defines the Highlight layer data
-
scene: Scene
defines the current scene
-
rootUrl: string
defines the root URL containing the Highlight layer information
Returns HighlightLayer
a parsed Highlight layer
-
The highlight layer Helps adding a glow effect around a mesh.
Once instantiated in a scene, simply use the addMesh or removeMesh method to add or remove glowy meshes to your scene.
!!! THIS REQUIRES AN ACTIVE STENCIL BUFFER ON THE CANVAS !!!