API Docs for: 2.7.3
Show:

wnp.Outliner Class

Module: Rendering
Parent Module: Wanaplan

Outlining effect manager. Renders an outline on mesh/submeshes as an emphasis effect.

Constructor

wnp.Outliner

(
  • scene
)

Parameters:

  • scene BABYLON.Scene

    The scene.

Methods

getMeshes

() BABYLON.Mesh

Returns an array of currently outlined meshes. See also getSubMeshIndexes for a more detailed understanding of the handled meshes/submeshes.

Returns:

BABYLON.Mesh:

An array of meshes.

getSubMeshIndexes

() Number[]

Returns a 2D array of currently outlined subMesh indexes.

Returns:

Number[]:

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

()

Hides the outline. Must be called when no meshes are outlined, in order to preserve the framerate.

setColor

(
  • color
)

Sets the color of the outline. Default is red.

Parameters:

  • color BABYLON.Color4

    The requested color.

setMeshes

(
  • meshes
)

Sets an array of currently outlined meshes. See also getSubMeshIndexes for a more detailed understanding of the handled meshes/submeshes.

Parameters:

  • meshes BABYLON.Mesh

    An array of meshes.

setSubMeshesIndexes

(
  • subMeshesIndexes
)

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

(
  • value
)

Sets the thickness of the outline. Default is 1.

Parameters:

  • value Number

    Requested thickness.

show

()

Shows the outline.