OutlineRenderer

This class is responsible to draw bothe outline/overlay of meshes. It should not be used directly but through the available method on mesh.

Hierarchy

  • OutlineRenderer

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Instantiates a new outline renderer. (There could be only one per scene).

    Parameters

    • scene: Scene

      Defines the scene it belongs to

    Returns OutlineRenderer

Properties

name

name: string

The name of the component. Each component must have a unique name.

scene

scene: Scene

The scene the component belongs to.

zOffset

zOffset: number

Defines a zOffset to prevent zFighting between the overlay and the mesh.

Methods

dispose

  • dispose(): void
  • Disposes the component and the associated ressources.

    Returns void

isReady

  • isReady(subMesh: SubMesh, useInstances: boolean): boolean
  • Returns whether or not the outline renderer is ready for a given submesh. All the dependencies e.g. submeshes, texture, effect... mus be ready

    Parameters

    • subMesh: SubMesh

      Defines the submesh to check readyness for

    • useInstances: boolean

      Defines wheter wee are trying to render instances or not

    Returns boolean

    true if ready otherwise false

rebuild

  • rebuild(): void
  • Rebuilds the elements related to this component in case of context lost for instance.

    Returns void

register

  • register(): void

render

  • render(subMesh: SubMesh, batch: _InstancesBatch, useOverlay?: boolean): void
  • Renders the outline in the canvas.

    Parameters

    • subMesh: SubMesh

      Defines the sumesh to render

    • batch: _InstancesBatch

      Defines the batch of meshes in case of instances

    • Optional useOverlay: boolean

      Defines if the rendering is for the overlay or the outline

    Returns void

Generated using TypeDoc