Class: AssetManagerPlugin
Core-API.AssetManagerPlugin
Hierarchy
↳
AssetManagerPlugin
Implements
Properties
PluginType
▪ Static
Readonly
PluginType: "AssetManager"
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:30
ViewerTypeSlug
▪ Static
Readonly
ViewerTypeSlug: "vjson"
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:339
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:36
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:100
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:111
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:122
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:126
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:131
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:137
onAdded
▸ onAdded(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Implementation of
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:157
onDispose
▸ onDispose(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Implementation of
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:216
onRemove
▸ onRemove(viewer
): Promise
<void
>
Parameters
Name | Type |
---|---|
viewer | ViewerApp |
Returns
Promise
<void
>
Implementation of
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:220
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:248
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:293
exportPluginPreset
▸ exportPluginPreset(plugin
): any
Parameters
Name | Type |
---|---|
plugin | IViewerPlugin <IViewerApp > |
Returns
any
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:306
importPluginPreset
▸ importPluginPreset(json
, plugin?
): Promise
<undefined
| IViewerPlugin
<IViewerApp
>>
Parameters
Name | Type |
---|---|
json | any |
plugin? | IViewerPlugin <IViewerApp > |
Returns
Promise
<undefined
| IViewerPlugin
<IViewerApp
>>
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:321
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:340
applyViewerConfig
▸ applyViewerConfig(viewerConfig
, resources?
): void
Parameters
Name | Type |
---|---|
viewerConfig | any |
resources? | any |
Returns
void
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:350
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:384
addEventListener
▸ addEventListener(type
, listener
): void
Adds a listener to an event type.
Parameters
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
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
Name | Type |
---|---|
event | IEvent <"" > |
Returns
void
Implementation of
Inherited from
SimpleEventDispatcher.dispatchEvent
Defined in
webgi/src/helpers/EventDispatcher.ts:74
Accessors
importer
• get
importer(): undefined
| AssetImporter
Returns
undefined
| AssetImporter
Implementation of
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:230
exporter
• get
exporter(): undefined
| IAssetExporter
Returns
undefined
| IAssetExporter
Implementation of
Defined in
webgi/src/extras/asset_manager/AssetManagerPlugin.ts:234
materials
• get
materials(): undefined
| IMaterialManager
Returns
undefined
| IMaterialManager