Skip to main content

Class: VariationConfiguratorPlugin

Plugins.VariationConfiguratorPlugin

Hierarchy

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

AViewerPlugin.enabled

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:30


baseUrl

baseUrl: string = ''

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:32


variations

variations: Object

Type declaration

NameType
objectsIConfiguratorVariation[]
materialsIConfiguratorVariation[]

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:34


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:41


utils

Readonly utils: Object

Type declaration

NameType
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:239


toJSON

toJSON: any = undefined

Overrides

AViewerPlugin.toJSON

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:288


_dirty

Protected _dirty: boolean = false

Inherited from

AViewerPlugin._dirty

Defined in

webgi/src/core/AViewerPlugin.ts:23


_viewer

Protected Optional _viewer: ViewerApp

Inherited from

AViewerPlugin._viewer

Defined in

webgi/src/core/AViewerPlugin.ts:27


_ty

Protected _ty: readonly ["objects", "materials"]

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:148


_extForType

Protected _extForType: Object

Type declaration

NameType
objectsstring[]
materialsstring[]
imagesstring[]

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:149

Constructors

constructor

new VariationConfiguratorPlugin()

Inherited from

AViewerPlugin.constructor

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

NameType
valueboolean

Returns

void

Inherited from

AViewerPlugin.dirty

Defined in

webgi/src/core/AViewerPlugin.ts:20

Methods

onAdded

onAdded(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onAdded

Defined in

webgi/src/core/AViewerPlugin.ts:32


onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onDispose

Defined in

webgi/src/core/AViewerPlugin.ts:36


exportState

exportState(): any

Returns

any

Inherited from

AViewerPlugin.exportState

Defined in

webgi/src/core/AViewerPlugin.ts:64


importState

importState(state): Promise<void>

Parameters

NameType
stateany

Returns

Promise<void>

Inherited from

AViewerPlugin.importState

Defined in

webgi/src/core/AViewerPlugin.ts:67


storeState

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

Parameters

NameType
prefix?string
storage?Storage
data?any

Returns

void

Inherited from

AViewerPlugin.storeState

Defined in

webgi/src/core/AViewerPlugin.ts:74


loadState

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

Parameters

NameType
prefix?string
storage?Storage

Returns

Promise<void>

Inherited from

AViewerPlugin.loadState

Defined in

webgi/src/core/AViewerPlugin.ts:84


applyVariation

applyVariation(variation, item, type, force?): Promise<void>

Parameters

NameTypeDefault value
variationIConfiguratorVariationundefined
itemstring | numberundefined
type"objects" | "materials"undefined
forcebooleanfalse

Returns

Promise<void>

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:46


clearVariations

clearVariations(): void

Returns

void

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:123


importConfig

importConfig(config, folder?): void

Parameters

NameType
configany
folder?Unzipped

Returns

void

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:157


importPath

importPath(configPath): Promise<void>

Parameters

NameType
configPathstring

Returns

Promise<void>

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:208


getMaterials

getMaterials(name): string[]

Parameters

NameType
namestring

Returns

string[]

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:225


getObjects

getObjects(name): string[]

Parameters

NameType
namestring

Returns

string[]

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:228


getMaterialVariations

getMaterialVariations(): string[]

Returns

string[]

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:232


getObjectVariations

getObjectVariations(): string[]

Returns

string[]

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:235


onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onRemove

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:274


fromJSON

fromJSON(json): null | VariationConfiguratorPlugin

Parameters

NameType
jsonany

Returns

null | VariationConfiguratorPlugin

Overrides

AViewerPlugin.fromJSON

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:281


_storeKey

Protected _storeKey(prefix?): string

Parameters

NameType
prefix?string

Returns

string

Inherited from

AViewerPlugin._storeKey

Defined in

webgi/src/core/AViewerPlugin.ts:60


_loadMaterial

Protected _loadMaterial(path, blob?): Promise<undefined | IMaterial<any>>

Parameters

NameType
pathstring
blob?IFile

Returns

Promise<undefined | IMaterial<any>>

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:137


_loadObject

Protected _loadObject(path, blob?): Promise<IModel<Object3D<Event, string>>[]>

Parameters

NameType
pathstring
blob?IFile

Returns

Promise<IModel<Object3D<Event, string>>[]>

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:141


_exportConfiguratorState

Protected _exportConfiguratorState(): Promise<{ folder: undefined | Zippable ; config: any }>

Returns

Promise<{ folder: undefined | Zippable ; config: any }>

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:299