WanaPlan

API Docs for: 2.7.0
Show:

wnp.Outliner

Module: Rendering
Parent Module: Wanaplan

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.Scene

    The scene.

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:

BABYLON.Mesh:

An array of meshes.

getSubMeshIndexes

Syntax

getSubMeshIndexes

() Number[]

Summary

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

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.Color4

    The 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.Mesh

    An 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 Number

    Requested thickness.

show

Syntax

show

()

Summary

Shows the outline.