Class: LabelTools
Меньше 1 минуты
Class: LabelTools
Tools for creating and displaying labels in 3d space. Labels can display different content.
Constructors
constructor
• new LabelTools(renderManager
): LabelTools
Parameters
Name | Type | Description |
---|---|---|
renderManager | RenderManagerBase | RenderManager instance. |
Returns
Properties
labelMaps
• labelMaps: Map
<string
, LabelMapBase
>
Label maps storage. Each map contains a set of labels that are subject to one method of rendering and updating content.
Methods
addDomLabelMap
▸ addDomLabelMap(name
, render
, updater?
, horizontalAlignment?
, verticalAlignment?
): DomLabelMap
Adding a new label map.
Parameters
Name | Type | Description |
---|---|---|
name | string | Map name. |
render | (container : HTMLElement , value : any ) => void | Content render callback function. |
updater? | (container : HTMLElement , value : any ) => void | Content updater callback function. |
horizontalAlignment? | LabelAlignment | alignment for label container. |
verticalAlignment? | LabelAlignment | alignment for label container. |
Returns
clear
▸ clear(): void
Clear label maps.
Returns
void
dispose
▸ dispose(): void
Destroy and clear labels system assets.
Returns
void
init
▸ init(): void
Init labels system.
Returns
void
removeLabelMap
▸ removeLabelMap(name
): void
Delete existing label map.
Parameters
Name | Type | Description |
---|---|---|
name | string | Label map name. |
Returns
void
update
▸ update(): void
Update labels on viewer space.
Returns
void