Engine API Reference - v2.6.1
    Preparing search index...

    Class OutlineRenderer

    Class responsible for rendering color outlines around objects in the scene.

    Index

    Constructors

    • Create a new OutlineRenderer.

      Parameters

      • app: AppBase

        The application.

      • OptionalrenderingLayer: Layer

        A layer used internally to render the outlines. If not provided, the renderer will use the 'Immediate' layer. This needs to be supplied only if the 'Immediate' layer is not present in the scene.

      • Optionalpriority: number = -1

        The priority of the camera rendering the outlines. Should be smaller value than the priority of the scene camera, to be updated first. Defaults to -1.

      Returns OutlineRenderer

    Methods

    • Add an entity to the outline renderer.

      Parameters

      • entity: Entity

        The entity to add. All MeshInstance of the entity and its descendants will be added.

      • color: Color

        The color of the outline.

      • Optionalrecursive: boolean = true

        Whether to add MeshInstances of the entity's descendants. Defaults to true.

      Returns void

    • Update the outline renderer. Should be called once per frame.

      Parameters

      • sceneCameraEntity: Entity

        The camera used to render the scene, which is used to provide the camera properties to the outline rendering camera.

      • blendLayer: Layer

        The layer in which the outlines should be rendered.

      • blendLayerTransparent: boolean

        Whether the blend layer is transparent.

      Returns void

    • Remove an entity from the outline renderer.

      Parameters

      • entity: Entity

        The entity to remove.

      • Optionalrecursive: boolean = true

        Whether to add MeshInstances of the entity's descendants. Defaults to true.

      Returns void