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
Name | Type |
---|---|
importer? | AssetImporter |
materials? | IMaterialManager |
__namedParameters | AssetManagerOptions |
Overrides
SimpleEventDispatcher<''\>.constructor
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:42
Methods
addAsset
▸ addAsset(asset
, options?
): Promise
<ISceneObject
<any
>[]>
Parameters
Name | Type |
---|---|
asset | IAsset |
options | ImportAddOptions |
Returns
Promise
<ISceneObject
<any
>[]>
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:108
addFromPath
▸ addFromPath(path
, options?
): Promise
<ISceneObject
<any
>[]>
Parameters
Name | Type |
---|---|
path | string |
options | ImportAddOptions |
Returns
Promise
<ISceneObject
<any
>[]>
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:119
addProcessedAssets
▸ addProcessedAssets(imported
, options
): (undefined
| ISceneObject
<any
>)[]
Parameters
Name | Type |
---|---|
imported | ISceneObject <any >[] |
options | AddObjectOptions & 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
Name | Type |
---|---|
T | extends ISceneObject <any > = ISceneObject <any > |
Parameters
Name | Type |
---|---|
asset | undefined | string | IAsset |
options | ImportAddOptions |
Returns
Promise
<undefined
| T
>
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:135
addImported
▸ addImported(res
, options?
): Promise
<undefined
| ISceneObject
<any
>[]>
Parameters
Name | Type |
---|---|
res | any |
options | AddImportedOptions |
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
Name | Type |
---|---|
T | extends ISceneObject <any > |
Parameters
Name | Type |
---|---|
res | any |
options | AddImportedOptions |
Returns
Promise
<undefined
| T
>
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:146
onAdded
▸ onAdded(viewer
): void
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
void
Implementation of
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:166
onRemove
▸ onRemove(viewer
): void
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
void
Implementation of
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:225
exportViewerConfig
▸ exportViewerConfig(binary?
, meta?
): Record
<string
, any
>
Parameters
Name | Type | Default value | Description |
---|---|---|---|
binary | boolean | true | if set to false, encodes all the array buffers to base64 |
meta? | any | undefined |
Returns
Record
<string
, any
>
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:253
exportPluginPresets
▸ exportPluginPresets(filter?
): Object
Parameters
Name | Type |
---|---|
filter? | string [] |
Returns
Object
Name | Type |
---|---|
plugins | undefined | 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
Name | Type |
---|---|
plugin | IViewerPlugin <IViewerApp , boolean > |
Returns
any
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:311
importPluginPreset
▸ importPluginPreset(json
, plugin?
): Promise
<undefined
| IViewerPlugin
<IViewerApp
, boolean
>>
Parameters
Name | Type |
---|---|
json | any |
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
Name | Type |
---|---|
viewerConfig | any |
objLoader? | ObjectLoader2 |
Returns
Promise
<void
>
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:348
applyViewerConfig
▸ applyViewerConfig(viewerConfig
, resources?
): void
Parameters
Name | Type |
---|---|
viewerConfig | any |
resources? | any |
Returns
void
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:358
importConfigResources
▸ importConfigResources(json
, objLoader?
, extraResources?
): Promise
<any
>
Parameters
Name | Type | Description |
---|---|---|
json | any | |
objLoader? | ObjectLoader2 | |
extraResources? | any | preloaded 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
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:235
exporter
• get
exporter(): undefined
| IAssetExporter
Returns
undefined
| IAssetExporter
Implementation of
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:239
materials
• get
materials(): undefined
| IMaterialManager
Returns
undefined
| IMaterialManager