Skip to content

editorGlobalsLocalOrnamentDescriptor

Class: LocalOrnamentDescriptor

Ornament descriptor that is backed with svg (or any other image in the future) and just serialized in the model. Multiple descriptors with the same images have duplicated content. But we don't need to store anything in the assetDb When the model is gone, the ornamentDescriptor is gone. Can be used interchangeably with the OrnamentDescriptor everywhere.

Hierarchy

OrnamentDescriptor

LocalOrnamentDescriptor

PolygonOrnamentDescriptor

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

+ new LocalOrnamentDescriptor(side: PlateSide, content: string | ArrayBuffer | null, type: LocalOrnamentDescriptorType, params: OrnamentParameters): LocalOrnamentDescriptor

Overrides OrnamentDescriptor.constructor

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:28

Parameters:

Name Type Default Description
side PlateSide - the side of the plate to put the ornament on
content string | ArrayBuffer | null - -
type LocalOrnamentDescriptorType - -
params OrnamentParameters { type: "single", ornamentType: "cutout" } -

Returns: LocalOrnamentDescriptor

Properties

Protected anchor

anchor: PointOnSurfaceAnchor | null

Inherited from AbstractOrnamentDescriptor.anchor

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:21


Protected assembly

assembly: Assembly

Inherited from AbstractOrnamentDescriptor.assembly

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:19


Protected Readonly assetIdAndResourceName

assetIdAndResourceName: string

Inherited from OrnamentDescriptor.assetIdAndResourceName

Defined in src/model/data/Concepts/OrnamentDescriptor.ts:11


Protected Readonly changeEventEmitter

changeEventEmitter: EventEmitterIModelElementEvent = new EventEmitter()

Inherited from AbstractOrnamentDescriptor.changeEventEmitter

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:23


Private content

content: string | ArrayBuffer | null

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:25


Private contentBeenUpdated

contentBeenUpdated: boolean = false

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:28


Protected coversWholePlate

coversWholePlate: boolean = true

Inherited from AbstractOrnamentDescriptor.coversWholePlate

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:25


Private params

params: OrnamentParameters

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:27


Protected scale

scale: Vector3 = new Vector3(1, 1, 1)

Inherited from AbstractOrnamentDescriptor.scale

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:27


Protected side

side: PlateSide

Inherited from AbstractOrnamentDescriptor.side

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:31


Protected Readonly transformsChangeEventEmitter

transformsChangeEventEmitter: EventEmitterITransformsChangeEvent = new EventEmitter()

Inherited from AbstractOrnamentDescriptor.transformsChangeEventEmitter

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:29


Private Readonly type

type: LocalOrnamentDescriptorType

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:26

Methods

Protected _onAnchorChange

_onAnchorChange(event: IAnchorChangeEvent): void

Inherited from AbstractOrnamentDescriptor._onAnchorChange

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:191

Parameters:

Name Type
event IAnchorChangeEvent

Returns: void


Protected _onAnchorTransformsChange

_onAnchorTransformsChange(changeEvent: ITransformsChangeEvent): void

Inherited from AbstractOrnamentDescriptor._onAnchorTransformsChange

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:217

Parameters:

Name Type
changeEvent ITransformsChangeEvent

Returns: void


clone

clone(): LocalOrnamentDescriptor

Overrides OrnamentDescriptor.clone

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:71

Returns: LocalOrnamentDescriptor


destroy

destroy(): void

Implementation of IPositionableElement

Inherited from AbstractOrnamentDescriptor.destroy

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:187

Returns: void


doesCoverWholePlate

doesCoverWholePlate(): boolean

Inherited from AbstractOrnamentDescriptor.doesCoverWholePlate

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:51

Whether the ornament covers the whole plate (e.g. an endless ornament or a programmatic ornament that always uses the whole plate).

Ornaments that cover the whole plate still stay valid event if their "position" is outside the plate border.

Returns: boolean


getAnchor

getAnchor(): PointOnSurfaceAnchor‹›

Inherited from AbstractOrnamentDescriptor.getAnchor

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:101

Returns: PointOnSurfaceAnchor‹›


getAssembly

getAssembly(): Assembly

Implementation of IPositionableElement

Inherited from AbstractOrnamentDescriptor.getAssembly

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:105

Returns: Assembly


getAssetIdAndResourceName

getAssetIdAndResourceName(): string

Inherited from OrnamentDescriptor.getAssetIdAndResourceName

Defined in src/model/data/Concepts/OrnamentDescriptor.ts:31

The assetID and resource name of the ornament ToDo: How to handle pre-defined programmatic ornaments? by using "special/voronoi" as a assetIdAndResourceName?

Returns: string


getChangeEventEmitter

getChangeEventEmitter(): IPublicEventEmitterInterfaceIModelElementEvent

Implementation of IPositionableElement

Inherited from AbstractOrnamentDescriptor.getChangeEventEmitter

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:130

Returns: IPublicEventEmitterInterfaceIModelElementEvent


getContent

getContent(): string | ArrayBuffer | null

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:63

Returns: string | ArrayBuffer | null


getElementsThisDependsOn

getElementsThisDependsOn(): IModelElement[]

Implementation of IPositionableElement

Inherited from AbstractOrnamentDescriptor.getElementsThisDependsOn

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:123

Returns: IModelElement[]


getIsValid

getIsValid(): boolean

Implementation of IPositionableElement

Inherited from OrnamentDescriptor.getIsValid

Overrides AbstractOrnamentDescriptor.getIsValid

Defined in src/model/data/Concepts/OrnamentDescriptor.ts:23

Returns: boolean


getOrnamentParameters

getOrnamentParameters(): OrnamentParameters

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:49

Returns: OrnamentParameters


getOrnamentType

getOrnamentType(): "engraving" | "cutout"

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:45

Returns: "engraving" | "cutout"


getParent

getParent(): ITransformable

Implementation of IPositionableElement

Inherited from AbstractOrnamentDescriptor.getParent

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:149

Returns: ITransformable


getPosition

getPosition(): Vector3‹›

Inherited from AbstractOrnamentDescriptor.getPosition

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:71

Returns: Vector3‹›


getRealizerForClone

getRealizerForClone(modelElement: LocalOrnamentDescriptor): LocalOrnamentDescriptorRealizer

Overrides OrnamentDescriptor.getRealizerForClone

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:91

Parameters:

Name Type
modelElement LocalOrnamentDescriptor

Returns: LocalOrnamentDescriptorRealizer


getRotation

getRotation(): Quaternion‹›

Inherited from AbstractOrnamentDescriptor.getRotation

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:97

Returns: Quaternion‹›


getScale

getScale(): ReadonlyVector3

Inherited from AbstractOrnamentDescriptor.getScale

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:75

Returns: ReadonlyVector3


getSide

getSide(): PlateSide

Inherited from AbstractOrnamentDescriptor.getSide

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:40

Returns: PlateSide


getSurface

getSurface(): MeshSurface | null

Inherited from AbstractOrnamentDescriptor.getSurface

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:63

Returns: MeshSurface | null


getTransforms

getTransforms(): IReadOnlyTransforms

Implementation of IPositionableElement

Inherited from AbstractOrnamentDescriptor.getTransforms

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:142

Returns: IReadOnlyTransforms


getTransformsChangeEventEmitter

getTransformsChangeEventEmitter(): IPublicEventEmitterInterfaceITransformsChangeEvent

Implementation of IPositionableElement

Inherited from AbstractOrnamentDescriptor.getTransformsChangeEventEmitter

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:134

Returns: IPublicEventEmitterInterfaceITransformsChangeEvent


getTransformsDefiner

getTransformsDefiner(): IPositionableElementTransformsDefiner

Implementation of IPositionableElement

Inherited from AbstractOrnamentDescriptor.getTransformsDefiner

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:138

Returns: IPositionableElementTransformsDefiner


getType

getType(): LocalOrnamentDescriptorType

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:67

Returns: LocalOrnamentDescriptorType


hasContentBeenUpdated

hasContentBeenUpdated(): boolean

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:83

Returns: boolean


mapGlobalPositionToLocalPosition

mapGlobalPositionToLocalPosition(position: Vector3): Vector3

Inherited from AbstractOrnamentDescriptor.mapGlobalPositionToLocalPosition

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:109

Parameters:

Name Type
position Vector3

Returns: Vector3


setAssembly

setAssembly(assembly: Assembly): void

Implementation of IPositionableElement

Inherited from AbstractOrnamentDescriptor.setAssembly

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:156

Parameters:

Name Type
assembly Assembly

Returns: void


setContent

setContent(content: any): void

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:59

Parameters:

Name Type
content any

Returns: void


setContentAsUpdated

setContentAsUpdated(updated: boolean): void

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:87

Parameters:

Name Type Default
updated boolean true

Returns: void


setCoversWholePlate

setCoversWholePlate(coversWholePlate: any): void

Inherited from AbstractOrnamentDescriptor.setCoversWholePlate

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:55

Parameters:

Name Type
coversWholePlate any

Returns: void


setOrnamentParameters

setOrnamentParameters(params: OrnamentParameters): void

Defined in src/model/data/Concepts/LocalOrnamentDescriptor.ts:53

Parameters:

Name Type
params OrnamentParameters

Returns: void


setPlateSide

setPlateSide(plateSide: PlateSide): void

Inherited from AbstractOrnamentDescriptor.setPlateSide

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:59

Parameters:

Name Type
plateSide PlateSide

Returns: void


setPosition

setPosition(position: ReadonlyVector3): void

Inherited from AbstractOrnamentDescriptor.setPosition

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:89

Parameters:

Name Type
position ReadonlyVector3

Returns: void


setRotation

setRotation(rotation: Quaternion): void

Inherited from AbstractOrnamentDescriptor.setRotation

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:93

Parameters:

Name Type
rotation Quaternion

Returns: void


setScale

setScale(scale: ReadonlyVector3): this

Inherited from AbstractOrnamentDescriptor.setScale

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:79

Parameters:

Name Type
scale ReadonlyVector3

Returns: this


setTransformsDefiner

setTransformsDefiner(newAnchor: PointOnSurfaceAnchor): this

Inherited from AbstractOrnamentDescriptor.setTransformsDefiner

Defined in src/model/data/Concepts/AbstractOrnamentDescriptor.ts:163

Parameters:

Name Type Description
newAnchor PointOnSurfaceAnchor the anchor that defines the point on surface

Returns: this