Skip to main content

Class: AssetManagerPlugin

Asset-Management.AssetManagerPlugin

Hierarchy

Implements

Properties

PluginType

Static Readonly PluginType: "AssetManager"

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:28


ViewerTypeSlug

Static Readonly ViewerTypeSlug: "vjson"

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:351

Constructors

constructor

new AssetManagerPlugin(importer?, materials?, __namedParameters?)

Parameters

NameType
importer?AssetImporter
materials?IMaterialManager
__namedParametersAssetManagerOptions

Overrides

SimpleEventDispatcher.constructor

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:37

Methods

addAsset

addAsset(asset, options?): Promise<ISceneObject<any>[]>

Parameters

NameType
assetIAsset
optionsAnyOptions

Returns

Promise<ISceneObject<any>[]>

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:123


addFromPath

addFromPath(path, options?): Promise<ISceneObject<any>[]>

Parameters

NameType
pathstring
optionsAnyOptions

Returns

Promise<ISceneObject<any>[]>

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:134


addProcessedAssets

addProcessedAssets(imported, options): (undefined | ISceneObject<any>)[]

Parameters

NameType
importedISceneObject<any>[]
optionsAnyOptions

Returns

(undefined | ISceneObject<any>)[]

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:145


addAssetSingle

addAssetSingle<T>(asset, options?): Promise<undefined | T>

Type parameters

NameType
Textends ISceneObject<any> = ISceneObject<any>

Parameters

NameType
assetundefined | string | IAsset
optionsAnyOptions

Returns

Promise<undefined | T>

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:149


addImported

addImported(res, options?): Promise<undefined | ISceneObject<any>[]>

Parameters

NameType
resany
optionsAnyOptions

Returns

Promise<undefined | ISceneObject<any>[]>

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:154


addImportedSingle

addImportedSingle<T>(res, options?): Promise<undefined | T>

Type parameters

NameType
Textends ISceneObject<any>

Parameters

NameType
resany
optionsAnyOptions

Returns

Promise<undefined | T>

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:160


onAdded

onAdded(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Implementation of

IViewerPlugin.onAdded

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:180


onDispose

onDispose(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Implementation of

IViewerPlugin.onDispose

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:262


onRemove

onRemove(viewer): Promise<void>

Parameters

NameType
viewerViewerApp

Returns

Promise<void>

Implementation of

IViewerPlugin.onRemove

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:266


exportViewerConfig

exportViewerConfig(): Record<string, any>

Returns

Record<string, any>

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:289


exportPluginPresets

exportPluginPresets(filter?): Object

Parameters

NameType
filter?string[]

Returns

Object

NameType
pluginsundefined | any[]
resources{ geometries: {} = {}; materials: {} = {}; textures: {} = {}; images: {} = {}; shapes: {} = {}; skeletons: {} = {}; animations: {} = {} }
resources.geometries{}
resources.materials{}
resources.textures{}
resources.images{}
resources.shapes{}
resources.skeletons{}
resources.animations{}

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:306


exportPluginPreset

exportPluginPreset(plugin): any

Parameters

NameType
pluginIViewerPlugin<IViewerApp>

Returns

any

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:318


importPluginPreset

importPluginPreset(json, plugin?): Promise<undefined | IViewerPlugin<IViewerApp>>

Parameters

NameType
jsonany
plugin?IViewerPlugin<IViewerApp>

Returns

Promise<undefined | IViewerPlugin<IViewerApp>>

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:333


importViewerConfig

importViewerConfig(viewerConfig, objLoader?): Promise<void>

Parameters

NameType
viewerConfigany
objLoader?ObjectLoader2

Returns

Promise<void>

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:352


importConfigResources

importConfigResources(json, objLoader?): Promise<any>

Parameters

NameType
jsonany
objLoader?ObjectLoader2

Returns

Promise<any>

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:377


addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
type""
listener(event: IEvent<"">) => void

Returns

void

Implementation of

IViewerPlugin.addEventListener

Inherited from

SimpleEventDispatcher.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
type""
listener(event: IEvent<"">) => void

Returns

boolean

Implementation of

IViewerPlugin.hasEventListener

Inherited from

SimpleEventDispatcher.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
type""
listener(event: IEvent<"">) => void

Returns

void

Implementation of

IViewerPlugin.removeEventListener

Inherited from

SimpleEventDispatcher.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<"">

Returns

void

Implementation of

IViewerPlugin.dispatchEvent

Inherited from

SimpleEventDispatcher.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74

Accessors

importer

get importer(): undefined | AssetImporter

Returns

undefined | AssetImporter

Implementation of

IAssetManager.importer

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:276


exporter

get exporter(): undefined | IAssetExporter

Returns

undefined | IAssetExporter

Implementation of

IAssetManager.exporter

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:280


materials

get materials(): undefined | IMaterialManager

Returns

undefined | IMaterialManager

Defined in

webgi/src/extras/asset_manager/AssetManagerPlugin.ts:284