Skip to main content

Class: SimpleTextPlugin

Plugins.SimpleTextPlugin

Hierarchy

Properties

PluginType

Static Readonly PluginType: "SimpleTextPlugin"

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:107


enabled

enabled: boolean = true

Overrides

AViewerPlugin.enabled

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:108


options

options: TextSVGOptions

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:119


applyToMap

applyToMap: boolean = true

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:123


applyToBumpMap

applyToBumpMap: boolean = false

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:126


applyToAlphaMap

applyToAlphaMap: boolean = true

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:129


inverseAlphaMap

inverseAlphaMap: boolean = false

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:132


fonts

fonts: Record<string, string>

List of font names and paths to font files.

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:249


_dirty

Protected _dirty: boolean = false

Inherited from

AViewerPlugin._dirty

Defined in

webgi/src/core/AViewerPlugin.ts:25


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

AViewerPlugin._viewer

Defined in

webgi/src/core/AViewerPlugin.ts:29

Accessors

dirty

get dirty(): boolean

Returns

boolean

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:18

set dirty(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:22

Methods

onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onDispose

Defined in

webgi/src/core/AViewerPlugin.ts:38


onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onRemove

Defined in

webgi/src/core/AViewerPlugin.ts:42


toJSON

toJSON(meta?): any

Parameters

NameType
meta?any

Returns

any

Inherited from

AViewerPlugin.toJSON

Defined in

webgi/src/core/AViewerPlugin.ts:47


fromJSON

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

Parameters

NameType
dataany
meta?any

Returns

null | SimpleTextPlugin | Promise<null | SimpleTextPlugin>

Inherited from

AViewerPlugin.fromJSON

Defined in

webgi/src/core/AViewerPlugin.ts:54


addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

void

Inherited from

AViewerPlugin.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

boolean

Inherited from

AViewerPlugin.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
type"" | "serialize" | "deserialize"
listener(event: IEvent<"" | "serialize" | "deserialize">) => void

Returns

void

Inherited from

AViewerPlugin.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<"" | "serialize" | "deserialize">

Returns

void

Inherited from

AViewerPlugin.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74


getSelected

getSelected<T>(): undefined | T

Type parameters

NameType
Textends Object3D<Event, T>

Returns

undefined | T

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:109


onAdded

onAdded(v): Promise<void>

Parameters

NameType
vViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onAdded

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:111


addTextToSelected

addTextToSelected(): Promise<void>

Returns

Promise<void>

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:177


addText

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

Parameters

NameType
objMesh<BufferGeometry, Material | Material[]>
data?ITextSVGOptions

Returns

Promise<void>

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:197


updateText

updateText(obj, data): Promise<void>

Parameters

NameType
objMesh<BufferGeometry, Material | Material[]>
dataITextSVGOptions

Returns

Promise<void>

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:200


makeTextSvg

makeTextSvg(options): Promise<undefined | Texture>

Parameters

NameType
optionsITextSVGOptions

Returns

Promise<undefined | Texture>

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:253


_getAssetData

Protected _getAssetData(path): Promise<string>

Parameters

NameType
pathstring

Returns

Promise<string>

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:281

Constructors

constructor

new SimpleTextPlugin()

Overrides

AViewerPlugin.constructor

Defined in

webgi/src/plugins/SimpleTextPlugin.ts:134