Skip to main content

Outliner

This component allows adding a colored outline with thickness to fragments in a 3D scene. 📕 Tutorial. 📘 API.

Extends

  • Component

Implements

  • Disposable_2

Properties

styles

styles: DataSet<string>

A set of Highlighter styles to be linked with the outliner.

Remarks

Use this or addItems directly but avoid using both at the same time to prevent unwanted results


uuid

static readonly uuid: "2fd3bcc5-b3b6-4ded-9f64-f47a02854a10"

A unique identifier for the component.

This UUID is used to register the component within the Components system.

Accessors

color

set color(value): void

Sets the color for the outline.

Parameters

ParameterType
valueColor

enabled

get enabled(): boolean

OBC.Component.enabled

set enabled(value): void

OBC.Component.enabled

Parameters

ParameterType
valueboolean

Returns

boolean


fillColor

set fillColor(value): void

Sets the fill color for the outline effect in the postproduction pipeline.

Parameters

ParameterType
valueColor

fillOpacity

set fillOpacity(value): void

Sets the fill opacity for the outline pass in the postproduction renderer.

Parameters

ParameterType
valuenumber

thickness

set thickness(value): void

Sets the thickness of the outline effect in the post-production renderer.

Parameters

ParameterType
valuenumber

world

set world(value): void

The world where the outliner operates.

Parameters

ParameterType
valueundefined | World

Methods

addItems()

addItems(modelIdMap): Promise<void>

Adds items to be outlined.

Parameters

ParameterTypeDescription
modelIdMapModelIdMapAn object representing the model ID map to be added.

Returns

Promise<void>

A promise that resolves once the outliner has been updated with the new model ID map.


clean()

clean(): void

Cleans up the outlines.

Returns

void


dispose()

dispose(): void

Disposable.dispose

Returns

void

Implementation of

OBC.Disposable.dispose


removeItems()

removeItems(modelIdMap): Promise<void>

Removes items from the current outlines.

Parameters

ParameterTypeDescription
modelIdMapModelIdMapAn object representing the mapping of model IDs to be removed.

Returns

Promise<void>

A promise that resolves once the update operation is complete.


update()

update(modelIdMap): Promise<void>

Updates the outline effect with the current meshes from the mesher component.

Parameters

ParameterType
modelIdMapModelIdMap

Returns

Promise<void>