Skip to main content

Class: AssetManagerPlugin

Core-API.AssetManagerPlugin

Hierarchy

  • SimpleEventDispatcher<"">

    AssetManagerPlugin

Implements

Properties

PluginType

Static Readonly PluginType: "AssetManager"

Defined in

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


ViewerTypeSlug

Static Readonly ViewerTypeSlug: "vjson"

Defined in

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


storage

Optional Readonly storage: Storage | Cache

Defined in

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

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

Methods

addAsset

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

Parameters

NameType
assetIAsset
optionsImportAddOptions

Returns

Promise<ISceneObject<any>[]>

Defined in

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


addFromPath

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

Parameters

NameType
pathstring
optionsImportAddOptions

Returns

Promise<ISceneObject<any>[]>

Defined in

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


addProcessedAssets

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

Parameters

NameType
importedISceneObject<any>[]
optionsAddObjectOptions & AddModelOptions

Returns

(undefined | ISceneObject<any>)[]

Defined in

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


addAssetSingle

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

Type parameters

NameType
Textends ISceneObject<any> = ISceneObject<any>

Parameters

NameType
assetundefined | string | IAsset
optionsImportAddOptions

Returns

Promise<undefined | T>

Defined in

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


addImported

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

Parameters

NameType
resany
optionsAddImportedOptions

Returns

Promise<undefined | ISceneObject<any>[]>

Defined in

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


addImportedSingle

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

Type parameters

NameType
Textends ISceneObject<any>

Parameters

NameType
resany
optionsAddImportedOptions

Returns

Promise<undefined | T>

Defined in

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


onAdded

onAdded(viewer): void

Parameters

NameType
viewerViewerApp

Returns

void

Implementation of

IViewerPluginSync.onAdded

Defined in

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


onRemove

onRemove(viewer): void

Parameters

NameType
viewerViewerApp

Returns

void

Implementation of

IViewerPluginSync.onRemove

Defined in

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


exportViewerConfig

exportViewerConfig(binary?, meta?): Record<string, any>

Parameters

NameTypeDefault valueDescription
binarybooleantrueif set to false, encodes all the array buffers to base64
meta?anyundefined

Returns

Record<string, any>

Defined in

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


exportPluginPresets

exportPluginPresets(filter?): Object

Parameters

NameType
filter?string[]

Returns

Object

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

Defined in

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


exportPluginPreset

exportPluginPreset(plugin): any

Parameters

NameType
pluginIViewerPlugin<IViewerApp, boolean>

Returns

any

Defined in

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


importPluginPreset

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

Parameters

NameType
jsonany
plugin?IViewerPlugin<IViewerApp, boolean>

Returns

Promise<undefined | IViewerPlugin<IViewerApp, boolean>>

Defined in

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


importViewerConfig

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

Parameters

NameType
viewerConfigany
objLoader?ObjectLoader2

Returns

Promise<void>

Defined in

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


applyViewerConfig

applyViewerConfig(viewerConfig, resources?): void

Parameters

NameType
viewerConfigany
resources?any

Returns

void

Defined in

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


importConfigResources

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

Parameters

NameTypeDescription
jsonany
objLoader?ObjectLoader2
extraResources?anypreloaded resources in the format of viewer config resources.

Returns

Promise<any>

Defined in

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

Accessors

importer

get importer(): undefined | AssetImporter

Returns

undefined | AssetImporter

Implementation of

IAssetManager.importer

Defined in

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


exporter

get exporter(): undefined | IAssetExporter

Returns

undefined | IAssetExporter

Implementation of

IAssetManager.exporter

Defined in

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


materials

get materials(): undefined | IMaterialManager

Returns

undefined | IMaterialManager

Defined in

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