Class: SimpleTextPlugin
Plugins.SimpleTextPlugin
Hierarchy
AViewerPlugin
<""
>↳
SimpleTextPlugin
Properties
PluginType
▪ Static
Readonly
PluginType: "SimpleTextPlugin"
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:109
enabled
• enabled: boolean
= true
Overrides
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:110
options
• options: TextSVGOptions
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:121
applyToMap
• applyToMap: boolean
= true
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:126
applyToBumpMap
• applyToBumpMap: boolean
= false
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:130
applyToAlphaMap
• applyToAlphaMap: boolean
= true
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:134
inverseAlphaMap
• inverseAlphaMap: boolean
= false
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:138
fonts
• fonts: Record
<string
, string
>
List of font names and paths to font files.
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:255
_dirty
• Protected
_dirty: boolean
= false
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:23
_viewer
• Protected
Optional
_viewer: ViewerApp
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:27
Accessors
dirty
• get
dirty(): boolean
Returns
boolean
Inherited from
AViewerPlugin.dirty
Defined in
webgi/src/core/AViewerPlugin.ts:16
• set
dirty(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
Returns
void
Inherited from
AViewerPlugin.dirty
Defined in
webgi/src/core/AViewerPlugin.ts:20
viewer
• get
viewer(): undefined
| TViewer
Returns
undefined
| TViewer
Inherited from
AViewerPlugin.viewer
Defined in
webgi/src/core/AViewerPlugin.ts:29
Methods
onDispose
▸ onDispose(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:40
onRemove
▸ onRemove(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:44
toJSON
▸ toJSON(meta?
): any
Parameters
Name | Type |
---|---|
meta? | any |
Returns
any
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:49
fromJSON
▸ fromJSON(data
, meta?
): null
| SimpleTextPlugin
| Promise
<null
| SimpleTextPlugin
>
Parameters
Name | Type |
---|---|
data | any |
meta? | any |
Returns
null
| SimpleTextPlugin
| Promise
<null
| SimpleTextPlugin
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:56
exportState
▸ exportState(): any
Returns
any
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:68
importState
▸ importState(state
): Promise
<void
>
Parameters
Name | Type |
---|---|
state | any |
Returns
Promise
<void
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:71
storeState
▸ storeState(prefix?
, storage?
, data?
): void
Parameters
Name | Type |
---|---|
prefix? | string |
storage? | Storage |
data? | any |
Returns
void
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:78
loadState
▸ loadState(prefix?
, storage?
): Promise
<void
>
Parameters
Name | Type |
---|---|
prefix? | string |
storage? | Storage |
Returns
Promise
<void
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:88
getSelected
▸ getSelected<T
>(): undefined
| T
Type parameters
Name | Type |
---|---|
T | extends Object3D <Event , string , T > |
Returns
undefined
| T
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:111
onAdded
▸ onAdded(v
): Promise
<void
>
Parameters
Name | Type |
---|---|
v | ViewerApp |
Returns
Promise
<void
>
Overrides
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:113
addTextToSelected
▸ addTextToSelected(): Promise
<void
>
Returns
Promise
<void
>
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:183
addText
▸ addText(obj
, data?
): Promise
<void
>
Parameters
Name | Type |
---|---|
obj | Mesh <BufferGeometry <NormalBufferAttributes , Event , string >, Material <Event , string > | Material <Event , string >[]> |
data? | ITextSVGOptions |
Returns
Promise
<void
>
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:203
updateText
▸ updateText(obj
, data
): Promise
<void
>
Parameters
Name | Type |
---|---|
obj | Mesh <BufferGeometry <NormalBufferAttributes , Event , string >, Material <Event , string > | Material <Event , string >[]> |
data | ITextSVGOptions |
Returns
Promise
<void
>
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:206
makeTextSvg
▸ makeTextSvg(options
): Promise
<undefined
| Texture
>
Parameters
Name | Type |
---|---|
options | ITextSVGOptions |
Returns
Promise
<undefined
| Texture
>
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:259
_storeKey
▸ Protected
_storeKey(prefix?
): string
Parameters
Name | Type |
---|---|
prefix? | string |
Returns
string
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:64
_getAssetData
▸ Protected
_getAssetData(path
): Promise
<string
>
Parameters
Name | Type |
---|---|
path | string |
Returns
Promise
<string
>
Defined in
webgi/src/plugins/SimpleTextPlugin.ts:287
Constructors
constructor
• new SimpleTextPlugin()