CustomObject
Extends
AbstractEntity
class CustomObject extends AbstractEntity
Specialized Entities
Static
create
static create(json = null): CustomObject
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Returns:
Type: CustomObject
getName
static getName(): string
Returns:
Type: constant ("CustomObject": string)
Constructor
constructor
constructor(json = null): CustomObject
CustomObject is abstract and cannot be instantiated
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Properties
autoscale
Type | Default | Description |
---|---|---|
boolean | false |
id
Type | Default | Description |
---|---|---|
null | int | symbol | null | The entity identifier |
metadata
Type | Default | Description |
---|---|---|
Map | new Map() |
offset
Type | Default | Description |
---|---|---|
Vector | new Vector() |
orientation_mode
Type | Default | Description |
---|---|---|
enum(CUSTOM_OBJECT_ORIENTATION_MODES) | CUSTOM_OBJECT_ORIENTATION_MODES.BILLBOARD |
permanent_display
Type | Default | Description |
---|---|---|
boolean | true |
place
Type | Default | Description |
---|---|---|
Reference<Place> | new Reference('Place', null) |
poi
Type | Default | Description |
---|---|---|
Reference<Poi> | new Reference('Poi', null) |
priority
Type | Default | Description |
---|---|---|
int | 0 |
rotation
Type | Default | Description |
---|---|---|
number | 0 |
site
Type | Default | Description |
---|---|---|
Reference<Site> | new Reference('Site', null) |
type
Type | Default | Description |
---|---|---|
enum(CUSTOM_OBJECT_TYPES) | null |
Read-Only
Methods
toJSON
toJSON(): object
Returns:
Type: object (see properties bellow)
Name | Type | Description |
---|---|---|
autoscale | boolean | |
id | int | symbol | null | |
metadata | object | |
offset | {x: number, y: number, z: number} | See Vector |
orientation_mode | string | See CUSTOM_OBJECT_ORIENTATION_MODES |
permanent_display | boolean | |
place | int | symbol | null | |
poi | int | symbol | null | |
priority | int | |
rotation | number | |
site | int | symbol | null | |
type | string | null |
fromJSON
fromJSON(json: object): CustomObject
Parameters:
Name | Type | Required | Default | Description |
---|---|---|---|---|
json | object | Yes | - | |
json.autoscale | boolean | No | false | |
json.id | int | symbol | null | No | null | |
json.metadata | object | No | {} | |
json.offset | {x: number, y: number, z: number} | No | {x: 0, y: 0, z: 0} | See Vector |
json.orientation_mode | string | No | 'BILLBOARD' | See CUSTOM_OBJECT_ORIENTATION_MODES |
json.permanent_display | boolean | No | true | |
json.place | int | symbol | null | No | null | |
json.poi | int | symbol | null | No | null | |
json.priority | int | No | 0 | |
json.rotation | number | No | 0 | |
json.site | int | symbol | null | No | null | |
json.type | string | null | No | null |
Returns:
Returns this
clone
clone(): CustomObject
Returns:
A new deep copy
Type: CustomObject