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


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

NameType
objectsIConfiguratorVariation[]
materialsIConfiguratorVariation[]

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

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


toJSON

toJSON: any = undefined

Overrides

AViewerPlugin.toJSON

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:289


_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:149


_extForType

Protected _extForType: Object

Type declaration

NameType
objectsstring[]
materialsstring[]
imagesstring[]

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:150

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


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

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onAdded

Defined in

webgi/src/core/AViewerPlugin.ts:36


onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Inherited from

AViewerPlugin.onDispose

Defined in

webgi/src/core/AViewerPlugin.ts:40


exportState

exportState(): any

Returns

any

Inherited from

AViewerPlugin.exportState

Defined in

webgi/src/core/AViewerPlugin.ts:68


importState

importState(state): Promise<void>

Parameters

NameType
stateany

Returns

Promise<void>

Inherited from

AViewerPlugin.importState

Defined in

webgi/src/core/AViewerPlugin.ts:71


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


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


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


clearVariations

clearVariations(): void

Returns

void

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:124


importConfig

importConfig(config, folder?): void

Parameters

NameType
configany
folder?Unzipped

Returns

void

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:158


importPath

importPath(configPath): Promise<void>

Parameters

NameType
configPathstring

Returns

Promise<void>

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:209


getMaterials

getMaterials(name): string[]

Parameters

NameType
namestring

Returns

string[]

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:226


getObjects

getObjects(name): string[]

Parameters

NameType
namestring

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

NameType
viewerViewerApp

Returns

Promise<void>

Overrides

AViewerPlugin.onRemove

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:275


fromJSON

fromJSON(json): null | VariationConfiguratorPlugin

Parameters

NameType
jsonany

Returns

null | VariationConfiguratorPlugin

Overrides

AViewerPlugin.fromJSON

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:282


_storeKey

Protected _storeKey(prefix?): string

Parameters

NameType
prefix?string

Returns

string

Inherited from

AViewerPlugin._storeKey

Defined in

webgi/src/core/AViewerPlugin.ts:64


_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:138


_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:142


_exportConfiguratorState

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

Returns

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

Defined in

webgi/src/plugins/VariationConfiguratorPlugin.ts:300