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


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


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


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


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


onAdded

onAdded(viewer): void

Parameters

NameType
viewerViewerApp

Returns

void

Implementation of

IViewerPluginSync.onAdded

Defined in

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


onRemove

onRemove(viewer): void

Parameters

NameType
viewerViewerApp

Returns

void

Implementation of

IViewerPluginSync.onRemove

Defined in

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


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


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


exportPluginPreset

exportPluginPreset(plugin): any

Parameters

NameType
pluginIViewerPlugin<IViewerApp, boolean>

Returns

any

Defined in

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


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


importViewerConfig

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

Parameters

NameType
viewerConfigany
objLoader?ObjectLoader2

Returns

Promise<void>

Defined in

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


applyViewerConfig

applyViewerConfig(viewerConfig, resources?): void

Parameters

NameType
viewerConfigany
resources?any

Returns

void

Defined in

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


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

Accessors

importer

get importer(): undefined | AssetImporter

Returns

undefined | AssetImporter

Implementation of

IAssetManager.importer

Defined in

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


exporter

get exporter(): undefined | IAssetExporter

Returns

undefined | IAssetExporter

Implementation of

IAssetManager.exporter

Defined in

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


materials

get materials(): undefined | IMaterialManager

Returns

undefined | IMaterialManager

Defined in

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