Class: VariationConfiguratorPlugin
Plugins.VariationConfiguratorPlugin
Hierarchy
AViewerPlugin
<""
>↳
VariationConfiguratorPlugin
Properties
PluginType
▪ Static
Readonly
PluginType: "VariationConfiguratorPlugin"
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:27
dependencies
• dependencies: typeof AssetManagerPlugin
[]
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:29
enabled
• enabled: boolean
= true
Overrides
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:30
serializeWithViewer
• serializeWithViewer: boolean
= false
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:31
baseUrl
• baseUrl: string
= ''
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:33
variations
• variations: Object
Type declaration
Name | Type |
---|---|
objects | IConfiguratorVariation [] |
materials | IConfiguratorVariation [] |
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:35
autoDispose
• autoDispose: boolean
= true
Default = true. When set to false the items will not be disposed when removed.
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:42
utils
• Readonly
utils: Object
Type declaration
Name | Type |
---|---|
getName | (item : IConfiguratorVariation | { name? : string ; prefix : string }) => string |
getTitle | (item : IConfiguratorVariation ) => string |
getIcon | (variation : IConfiguratorVariation , type : "objects" | "materials" ) => string |
getItemIcon | (variation : IConfiguratorVariation , i : number , type : "objects" | "materials" ) => string |
getItemTitle | (variation : IConfiguratorVariation , i : number ) => string |
getItemPath | (variation : IConfiguratorVariation , i : number , type : "objects" | "materials" ) => string |
pathToTitle | (item : string ) => string |
pathToIcon | (item : string ) => string |
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:240
toJSON
• toJSON: any
= undefined
Overrides
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:289
_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
_ty
• Protected
_ty: readonly ["objects"
, "materials"
]
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:149
_extForType
• Protected
_extForType: Object
Type declaration
Name | Type |
---|---|
objects | string [] |
materials | string [] |
images | string [] |
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:150
Constructors
constructor
• new VariationConfiguratorPlugin()
Inherited from
Defined in
webgi/node_modules/ts-browser-helpers/dist/EventDispatcher.d.ts:41
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
onAdded
▸ onAdded(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:36
onDispose
▸ onDispose(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:40
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
applyVariation
▸ applyVariation(variation
, item
, type
, force?
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
variation | IConfiguratorVariation | undefined |
item | string | number | undefined |
type | "objects" | "materials" | undefined |
force | boolean | false |
Returns
Promise
<void
>
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:47
clearVariations
▸ clearVariations(): void
Returns
void
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:124
importConfig
▸ importConfig(config
, folder?
): void
Parameters
Name | Type |
---|---|
config | any |
folder? | Unzipped |
Returns
void
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:158
importPath
▸ importPath(configPath
): Promise
<void
>
Parameters
Name | Type |
---|---|
configPath | string |
Returns
Promise
<void
>
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:209
getMaterials
▸ getMaterials(name
): string
[]
Parameters
Name | Type |
---|---|
name | string |
Returns
string
[]
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:226
getObjects
▸ getObjects(name
): string
[]
Parameters
Name | Type |
---|---|
name | string |
Returns
string
[]
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:229
getMaterialVariations
▸ getMaterialVariations(): string
[]
Returns
string
[]
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:233
getObjectVariations
▸ getObjectVariations(): string
[]
Returns
string
[]
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:236
onRemove
▸ onRemove(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Overrides
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:275
fromJSON
▸ fromJSON(json
): null
| VariationConfiguratorPlugin
Parameters
Name | Type |
---|---|
json | any |
Returns
null
| VariationConfiguratorPlugin
Overrides
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:282
_storeKey
▸ Protected
_storeKey(prefix?
): string
Parameters
Name | Type |
---|---|
prefix? | string |
Returns
string
Inherited from
Defined in
webgi/src/core/AViewerPlugin.ts:64
_loadMaterial
▸ Protected
_loadMaterial(path
, blob?
): Promise
<undefined
| IMaterial
<any
>>
Parameters
Name | Type |
---|---|
path | string |
blob? | IFile |
Returns
Promise
<undefined
| IMaterial
<any
>>
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:138
_loadObject
▸ Protected
_loadObject(path
, blob?
): Promise
<IModel
<Object3D
<Event
, string
>>[]>
Parameters
Name | Type |
---|---|
path | string |
blob? | IFile |
Returns
Promise
<IModel
<Object3D
<Event
, string
>>[]>
Defined in
webgi/src/plugins/VariationConfiguratorPlugin.ts:142
_exportConfiguratorState
▸ Protected
_exportConfiguratorState(): Promise
<{ folder
: undefined
| Zippable
; config
: any
}>
Returns
Promise
<{ folder
: undefined
| Zippable
; config
: any
}>