wnp.Outliner
Summary
Outlining effect manager. Renders an outline on mesh/submeshes as an emphasis effect.
Constructor
wnp.Outliner
Syntax
wnp.Outliner
-
scene
Summary
Parameters:
-
scene
BABYLON.SceneThe scene.
Item Index
Methods
getMeshes
Syntax
getMeshes
()
BABYLON.Mesh
Summary
Returns an array of currently outlined meshes. See also getSubMeshIndexes
for a more detailed understanding of the handled meshes/submeshes.
Returns:
An array of meshes.
getSubMeshIndexes
Syntax
getSubMeshIndexes
()
Number[]
Summary
Returns a 2D array of currently outlined subMesh indexes.
Returns:
The subMesh indexes.
Example:
var meshes = outliner.getMeshes();
var indexes = outliner.getSubMeshIndexes();
Given this configuration, if meshes[i]
is defined, two scenarios are possible :
- Either
indexes[i]
is an Array of submesh indexes, and only the subMeshes of these indexes will be highlighted (if they exist). - Either
indexes[i]
is undefined or an empty Array, and the whole mesh is highlighted.
hide
Syntax
hide
()
Summary
Hides the outline. Must be called when no meshes are outlined, in order to preserve the framerate.
setColor
Syntax
setColor
-
color
Summary
Sets the color of the outline. Default is red.
Parameters:
-
color
BABYLON.Color4The requested color.
setMeshes
Syntax
setMeshes
-
meshes
Summary
Sets an array of currently outlined meshes. See also getSubMeshIndexes
for a more detailed understanding of the handled meshes/submeshes.
Parameters:
-
meshes
BABYLON.MeshAn array of meshes.
setSubMeshesIndexes
Syntax
setSubMeshesIndexes
-
subMeshesIndexes
Summary
Sets a 2D array of currently outlined subMesh indexes. See also getSubMeshIndexes
for a more detailed understanding of the handled meshes/submeshes.
Parameters:
-
subMeshesIndexes
Number[]The subMesh indexes.
setThickness
Syntax
setThickness
-
value
Summary
Sets the thickness of the outline. Default is 1.
Parameters:
-
value
NumberRequested thickness.
show
Syntax
show
()
Summary
Shows the outline.