Class: SimpleTextPlugin
Plugins.SimpleTextPlugin
Hierarchy
AViewerPlugin
<""
>↳
SimpleTextPlugin
Properties
PluginType
▪ Static
Readonly
PluginType: "SimpleTextPlugin"
enabled
• enabled: boolean
= true
Overrides
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
_viewer
• Protected
Optional
_viewer: ViewerApp
Inherited from
Accessors
dirty
• get
dirty(): boolean
Returns
boolean
Inherited from
AViewerPlugin.dirty
• set
dirty(value
): void
Parameters
Name | Type |
---|---|
value | boolean |
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
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Inherited from
onRemove
▸ onRemove(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Inherited from
toJSON
▸ toJSON(meta?
): any
Parameters
Name | Type |
---|---|
meta? | any |
Returns
any
Inherited from
fromJSON
▸ fromJSON(data
, meta?
): null
| SimpleTextPlugin
| Promise
<null
| SimpleTextPlugin
>
Parameters
Name | Type |
---|---|
data | any |
meta? | any |
Returns
null
| SimpleTextPlugin
| Promise
<null
| SimpleTextPlugin
>
Inherited from
exportState
▸ exportState(): any
Returns
any
Inherited from
importState
▸ importState(state
): Promise
<void
>
Parameters
Name | Type |
---|---|
state | any |
Returns
Promise
<void
>
Inherited from
storeState
▸ storeState(prefix?
, storage?
, data?
): void
Parameters
Name | Type |
---|---|
prefix? | string |
storage? | Storage |
data? | any |
Returns
void
Inherited from
loadState
▸ loadState(prefix?
, storage?
): Promise
<void
>
Parameters
Name | Type |
---|---|
prefix? | string |
storage? | Storage |
Returns
Promise
<void
>
Inherited from
getSelected
▸ getSelected<T
>(): undefined
| T
Type parameters
Name | Type |
---|---|
T | extends Object3D <Object3DEventMap , T > |
Returns
undefined
| T
onAdded
▸ onAdded(v
): Promise
<void
>
Parameters
Name | Type |
---|---|
v | ViewerApp |
Returns
Promise
<void
>
Overrides
addTextToSelected
▸ addTextToSelected(): Promise
<void
>
Returns
Promise
<void
>
addText
▸ addText(obj
, data?
): Promise
<void
>
Parameters
Name | Type |
---|---|
obj | Mesh <BufferGeometry <NormalBufferAttributes , BufferGeometryEventMap >, Material <MaterialEventMap > | Material <MaterialEventMap >[], Object3DEventMap > |
data? | ITextSVGOptions |
Returns
Promise
<void
>
updateText
▸ updateText(obj
, data
): Promise
<void
>
Parameters
Name | Type |
---|---|
obj | Mesh <BufferGeometry <NormalBufferAttributes , BufferGeometryEventMap >, Material <MaterialEventMap > | Material <MaterialEventMap >[], Object3DEventMap > |
data | ITextSVGOptions |
Returns
Promise
<void
>
makeTextSvg
▸ makeTextSvg(options
): Promise
<undefined
| Texture
<TextureEventMap
>>
Parameters
Name | Type |
---|---|
options | ITextSVGOptions |
Returns
Promise
<undefined
| Texture
<TextureEventMap
>>
_storeKey
▸ Protected
_storeKey(prefix?
): string
Parameters
Name | Type |
---|---|
prefix? | string |
Returns
string
Inherited from
_getAssetData
▸ Protected
_getAssetData(path
): Promise
<string
>
Parameters
Name | Type |
---|---|
path | string |
Returns
Promise
<string
>
Constructors
constructor
• new SimpleTextPlugin()