LabelObject
Extends
AdsumObject3D
Properties
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 |
levelOfDetails
The level of details associated to that object.
Type | Read-Only | Defaults | Description |
---|---|---|---|
LevelOfDetails | Yes | null |
Inherited Properties
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 |
Methods
getName
async getName(): Promise<string, Error>
Returns:
Type: Promise<string, Error>
getOffset
async getOffset(): Promise<{x: number, y: number, z: number},Error>
Returns:
Type: Promise<{x: number, y: number, z: number}, Error>
getOrientationMode
async getOrientationMode(): Promise<LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC | LABEL_ORIENTATION_MODES.FLIP>
Returns:
Type: Promise<LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC | LABEL_ORIENTATION_MODES.FLIP, Error>
getOpacity
async getOpacity(): Promise<number, Error>
Returns:
Type: Promise<number, Error>
getParent
async getParent(): Promise<SiteObject|BuildingObject|FloorObject|SpaceObject, Error>
Returns:
Type: Promise<SiteObject | BuildingObject | FloorObject | SpaceObject, Error>
getRotation
async getRotation(): Promise<number, Error>
Returns:
Type: Promise<number, Error>
getScale
async getScale(): Promise<{x: number, y: number, z: number},Error>
Returns:
Type: Promise<{x: number, y: number, z: number}, Error>
isAutoScale
async isAutoScale(): Promise<boolean, Error>
Returns:
Type: Promise<boolean, Error>
isPermanentDisplay
async isPermanentDisplay(): Promise<boolean, Error>
Returns:
Type: Promise<boolean, Error>
isSelected
async isSelected(): Promise<boolean, Error>
Returns:
Type: Promise<boolean, Error>
moveBy
async moveBy(x: number, y: number, z: number): LabelObject
Move the label by incrementing the offset position. This method will set the getOffset.
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
x | number | Yes | - | |
y | number | Yes | - | |
z | number | Yes | - |
Returns:
Type: LabelObject
moveTo
async moveTo(x: number, y: number, z: number): LabelObject
Move the label to the given position. This method will set the getOffset.
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
x | number | Yes | - | |
y | number | Yes | - | |
z | number | Yes | - |
Returns:
Type: LabelObject
setAutoScale
async setAutoScale(autoScale: boolean): LabelObject
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
autoScale | boolean | Yes | - |
Returns:
Type: LabelObject
setOrientationMode
async setOrientationMode(orientationMode: LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
orientationMode | LABEL_ORIENTATION_MODES.BILLBOARD | LABEL_ORIENTATION_MODES.STATIC | Yes | - |
Returns:
Type: Promise<void, Error>
setOpacity
async setOpacity(opacity: number): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
opacity | number | Yes | - |
Returns:
Type: Promise<void, Error>
setPermanentDisplay
async setPermanentDisplay(permanentDisplay: boolean): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
permanentDisplay | boolean | Yes | - |
Returns:
Type: Promise<void, Error>
setRotation
async setRotation(rotation: number): Promise<void, Error>
Note: rotation is only available when getOrientationMode is LABEL_ORIENTATION_MODES.STATIC
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
rotation | number | Yes | - | The rotation in degrees |
Returns:
Type: Promise<void, Error>
setScale
async setScale(x: number, y: number, z: number): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
x | number | Yes | - | |
y | number | Yes | - | |
z | number | Yes | - |
Returns:
Type: Promise<void, Error>
select
async select(): Promise<void, Error>
Mark this label as selected, this will affect the visibility behavior according to isPermanentDisplay
Returns:
Type: Promise<void, Error>
unselect
async unselect(): Promise<void, Error>
Mark this label as unselected, this will affect the visibility behavior according to isPermanentDisplay
Returns:
Type: Promise<void, Error>
Overwritten Methods
getType
getType(): ADSUM_OBJECT_TYPES.LabelObject
Returns:
Type: ADSUM_OBJECT_TYPES.LabelObject
Inherited Methods
getPlaceId
async getPlaceId(): Promise<number, Error>
Returns:
Type: Promise<number, Error>
setDisplayMode
async setDisplayMode(displayMode: DISPLAY_MODES.NONE|DISPLAY_MODES.VISIBLE|DISPLAY_MODES.TRANSPARENT): Promise<void, Error>
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
displayMode | DISPLAY_MODES.NONE | DISPLAY_MODES.VISIBLE | DISPLAY_MODES.TRANSPARENT | Yes | - |
Returns:
Type: Promise<void, Error>
getDisplayMode
async getDisplayMode(): Promise<DISPLAY_MODES.NONE|DISPLAY_MODES.VISIBLE|DISPLAY_MODES.TRANSPARENT, Error>
Returns:
Type: Promise< DISPLAY_MODES.NONE | DISPLAY_MODES.VISIBLE | DISPLAY_MODES.TRANSPARENT, Error >