LabelImageObject
Extends
LabelObject
Constructor
constructor(options: LabelImageObjectOptions): LabelImageObject
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| options | LabelImageObjectOptions | object | Yes | The LabelImageObject options. Can be an LabelImageObjectOptions instance or directly the parameter to pass on the LabelImageObjectOptions constructor |
Properties
height
The image height in world unit.
| Type | Read-Only | Description |
|---|---|---|
| number | YES |
isLabelImage
Used to check whether this or derived classes are label images. Default is true.
You should not change this, as it used internally by the renderer for optimisation.
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| boolean | YES | True |
image
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| string | HTMLImageElement | HTMLCanvasElement | YES | - |
width
The image width in world unit.
| Type | Read-Only | Description |
|---|---|---|
| number | YES |
Inherited Properties
autoScale
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| boolean | YES | False |
id
| Type | Read-Only | Description |
|---|---|---|
| number | symbol | null | YES |
isAdsumObject
Used to check whether this or derived classes are Adsum object 3D. Default is true.
You should not change this, as it used internally by the renderer for optimisation.
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| boolean | YES | True |
isLabel
Used to check whether this or derived classes are labels. Default is true.
You should not change this, as it used internally by the renderer for optimisation.
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| boolean | YES | True |
isPermanentDisplay
Does the label is always visible or only on hover/selected state.
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| boolean | YES | True |
levelOfDetails
The level of details associated to that object.
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| LevelOfDetails | Yes | null |
offset
The label position offset in parent local system. This is in world unit.
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| {x: number, y: number, z: number } | YES | { x: 0, y: 0, z: 0 } |
orientationMode
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC | LABEL_ORIENTATION_MODES.FLIP | YES | LABEL_ORIENTATION_MODES.BILLBOARD |
opacity
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| number | YES | 1 | A number in 0-1 range |
parent
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| SiteObject | BuildingObject | FloorObject | SpaceObject | YES | - |
placeId
| Type | Read-Only | Description |
|---|---|---|
| number | symbol | null | YES |
rotation
The rotation in degrees.
Note: rotation is only available when orientationMode is LABEL_ORIENTATION_MODES.STATIC
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| number | YES | 0 |
scale
The label scale factor in each axes.
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| {x: number, y: number, z: number } | YES | { x: 1, y: 1, z: 1 } |
selected
| Type | Read-Only | Defaults | Description |
|---|---|---|---|
| boolean | YES | false |
Methods
setHeight
setHeight(height: number): LabelImageObject
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| height | number | Yes | - |
Returns:
Type: LabelImageObject
setImage
setImage(image: string | HTMLImageElement | HTMLCanvasElement ): LabelImageObject
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| image | string | HTMLImageElement | HTMLCanvasElement | Yes | - |
Returns:
Type: LabelImageObject
setWidth
setWidth(width: number): LabelImageObject
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| width | number | Yes | - |
Returns:
Type: LabelImageObject
Overwritten Methods
getType
getType(): ADSUM_OBJECT_TYPES.LabelImageObject
Returns:
Type: ADSUM_OBJECT_TYPES.LabelImageObject
Inherited Methods
getPosition
getPosition(): { x: number, y: number, z: number }
Gets the position relative to parent.
Returns:
Type: { x: number, y: number, z: number }
setDisplayMode
setDisplayMode(displayMode: DISPLAY_MODES.NONE|DISPLAY_MODES.VISIBLE|DISPLAY_MODES.TRANSPARENT): void
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| displayMode | DISPLAY_MODES.NONE | DISPLAY_MODES.VISIBLE | DISPLAY_MODES.TRANSPARENT | Yes | - |
Returns:
Type: void
getDisplayMode
getDisplayMode(): DISPLAY_MODES.NONE|DISPLAY_MODES.VISIBLE|DISPLAY_MODES.TRANSPARENT
Returns:
Type: DISPLAY_MODES.NONE | DISPLAY_MODES.VISIBLE | DISPLAY_MODES.TRANSPARENT
forceDisplayMode
forceDisplayMode(displayMode: DISPLAY_MODES.NONE|DISPLAY_MODES.VISIBLE|DISPLAY_MODES.TRANSPARENT|null): LabelObject
Force the display mode visibility. See Label Visibility
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| displayMode | null | DISPLAY_MODES.NONE | DISPLAY_MODES.VISIBLE | DISPLAY_MODES.TRANSPARENT | Yes | - |
Returns:
Type: LabelObject
moveBy
moveBy(x: number, y: number, z: number): LabelObject
Move the label by incrementing the offset position. This method will set the offset property.
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| x | number | Yes | - | |
| y | number | Yes | - | |
| z | number | Yes | - |
Returns:
Type: LabelObject
moveTo
moveTo(x: number, y: number, z: number): LabelObject
Move the label to the given position. This method will set the offset property.
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| x | number | Yes | - | |
| y | number | Yes | - | |
| z | number | Yes | - |
Returns:
Type: LabelObject
resetForceDisplayMode
resetForceDisplayMode(): LabelObject
Equivalent to forceDisplayMode( null )
Returns:
Type: LabelObject
setAutoScale
setAutoScale(autoScale: boolean): LabelObject
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| autoScale | boolean | Yes | - |
Returns:
Type: LabelObject
setOrientationMode
setOrientationMode(orientationMode: LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC): LabelObject
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| orientationMode | LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC | Yes | - |
Returns:
Type: LabelObject
setOpacity
setOpacity(opacity: number): LabelObject
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| opacity | number | Yes | - |
Returns:
Type: LabelObject
setPermanentDisplay
setPermanentDisplay(permanentDisplay: boolean): LabelObject
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| permanentDisplay | boolean | Yes | - |
Returns:
Type: LabelObject
setRotation
setRotation(rotation: number): LabelObject
Note: rotation is only available when orientationMode is LABEL_ORIENTATION_MODES.STATIC
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| rotation | number | Yes | - | The rotation in degrees |
Returns:
Type: LabelObject
setScale
setScale(x: number, y: number, z: number): LabelObject
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| x | number | Yes | - | |
| y | number | Yes | - | |
| z | number | Yes | - |
Returns:
Type: LabelObject
select
select(): LabelObject
Mark this label as selected, this will affect the visibility behavior according to isPermanentDisplay property
Returns:
Type: LabelObject
unselect
unselect(): LabelObject
Mark this label as unselected, this will affect the visibility behavior according to isPermanentDisplay property
Returns:
Type: LabelObject
