Class: DomLabelMap
Меньше 1 минуты
Class: DomLabelMap
Labels map with DOM rendering support.
Hierarchy
↳
DomLabelMap
Constructors
constructor
• new DomLabelMap(renderManager
, render
, updater
, labelsContainer
, horizontalAlignment
, verticalAlignment
): DomLabelMap
Parameters
Name | Type | Description |
---|---|---|
renderManager | RenderManagerBase | RenderManager instance. |
render | (container : HTMLElement , value : any ) => void | Content render callback function. |
updater | (container : HTMLElement , value : any ) => void | Content updater callback function. |
labelsContainer | HTMLDivElement | DOM parent container for label containers. |
horizontalAlignment | LabelAlignment | alignment for label container. |
verticalAlignment | LabelAlignment | alignment for label container. |
Returns
Overrides
LabelMapBase.constructor
Properties
labels
• labels: Map
<string
, DomLabel
>
Labels map.
Methods
add
▸ add(name
, position
, value
): void
Update single label to labels map.
Parameters
Name | Type | Description |
---|---|---|
name | string | Label name. |
position | Vector3 | Label position in 3D space. |
value | any | label content. |
Returns
void
clear
▸ clear(): void
Clear labels.
Returns
void
Overrides
update
▸ update(name
, value
): void
Update single label content.
Parameters
Name | Type | Description |
---|---|---|
name | string | Label name. |
value | any | label content. |
Returns
void