Skip to main content

Class: SimpleTextPlugin

Plugins.SimpleTextPlugin

Hierarchy

Properties

PluginType

Static Readonly PluginType: "SimpleTextPlugin"


enabled

enabled: boolean = true

Overrides

AViewerPlugin.enabled


options

options: TextSVGOptions


applyToMap

applyToMap: boolean = true


applyToBumpMap

applyToBumpMap: boolean = false


applyToAlphaMap

applyToAlphaMap: boolean = true


inverseAlphaMap

inverseAlphaMap: boolean = false


fonts

fonts: Record<string, string>

List of font names and paths to font files.


_dirty

Protected _dirty: boolean = false

Inherited from

AViewerPlugin._dirty


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

AViewerPlugin._viewer

Accessors

dirty

get dirty(): boolean

Returns

boolean

Inherited from

AViewerPlugin.dirty

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

AViewerPlugin.dirty


viewer

get viewer(): undefined | ViewerApp

Returns

undefined | ViewerApp

Inherited from

AViewerPlugin.viewer

Methods

onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onDispose


onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onRemove


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Inherited from

AViewerPlugin.toJSON


fromJSON

fromJSON(data, meta?): null | SimpleTextPlugin | Promise<null | SimpleTextPlugin>

Parameters

NameType
dataany
meta?any

Returns

null | SimpleTextPlugin | Promise<null | SimpleTextPlugin>

Inherited from

AViewerPlugin.fromJSON


exportState

exportState(): any

Returns

any

Inherited from

AViewerPlugin.exportState


importState

importState(state): Promise<void>

Parameters

NameType
stateany

Returns

Promise<void>

Inherited from

AViewerPlugin.importState


storeState

storeState(prefix?, storage?, data?): void

Parameters

NameType
prefix?string
storage?Storage
data?any

Returns

void

Inherited from

AViewerPlugin.storeState


loadState

loadState(prefix?, storage?): Promise<void>

Parameters

NameType
prefix?string
storage?Storage

Returns

Promise<void>

Inherited from

AViewerPlugin.loadState


getSelected

getSelected<T>(): undefined | T

Type parameters

NameType
Textends Object3D<Object3DEventMap, T>

Returns

undefined | T


onAdded

onAdded(v): Promise<void>

Parameters

NameType
vViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onAdded


addTextToSelected

addTextToSelected(): Promise<void>

Returns

Promise<void>


addText

addText(obj, data?): Promise<void>

Parameters

NameType
objMesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, Material<MaterialEventMap> | Material<MaterialEventMap>[], Object3DEventMap>
data?ITextSVGOptions

Returns

Promise<void>


updateText

updateText(obj, data): Promise<void>

Parameters

NameType
objMesh<BufferGeometry<NormalBufferAttributes, BufferGeometryEventMap>, Material<MaterialEventMap> | Material<MaterialEventMap>[], Object3DEventMap>
dataITextSVGOptions

Returns

Promise<void>


makeTextSvg

makeTextSvg(options): Promise<undefined | Texture<TextureEventMap>>

Parameters

NameType
optionsITextSVGOptions

Returns

Promise<undefined | Texture<TextureEventMap>>


_storeKey

Protected _storeKey(prefix?): string

Parameters

NameType
prefix?string

Returns

string

Inherited from

AViewerPlugin._storeKey


_getAssetData

Protected _getAssetData(path): Promise<string>

Parameters

NameType
pathstring

Returns

Promise<string>

Constructors

constructor

new SimpleTextPlugin()

Overrides

AViewerPlugin.constructor