Skip to main content

Class: AssetImporter

Core-API.AssetImporter

Hierarchy

Implements

Accessors

cachedAssets

get cachedAssets(): IAsset[]

Returns

IAsset[]

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:45


processors

get processors(): ObjectProcessorMap<TAssetTypes>

Returns

ObjectProcessorMap<TAssetTypes>

Implementation of

IAssetImporter.processors

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:50


loadingManager

get loadingManager(): LoadingManager

Returns

LoadingManager

Implementation of

IAssetImporter.loadingManager

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:54

Properties

Importers

Readonly Importers: IImporter[]

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:62

Constructors

constructor

new AssetImporter(viewer, logging?)

Parameters

NameTypeDefault value
viewerViewerAppundefined
loggingbooleanfalse

Overrides

SimpleEventDispatcher<AssetImportEventTypes\>.constructor

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:72

Methods

addEventListener

addEventListener(type, listener): void

Parameters

NameType
typeAssetImportEventTypes
listener(event: IEvent<AssetImportEventTypes>) => void

Returns

void

Implementation of

IAssetImporter.addEventListener

Overrides

SimpleEventDispatcher.addEventListener

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:152


importFiles

importFiles(files, options?): Promise<Map<string, ISceneObject<any>[]>>

Parameters

NameType
filesMap<string, IFile>
optionsImportFilesOptions

Returns

Promise<Map<string, ISceneObject<any>[]>>

Implementation of

IAssetImporter.importFiles

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:165


registerFile

registerFile(path, file?): undefined | ILoader<any, any>

Parameters

NameType
pathstring
file?IFile

Returns

undefined | ILoader<any, any>

Implementation of

IAssetImporter.registerFile

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:220


unregisterFile

unregisterFile(path): void

Parameters

NameType
pathstring

Returns

void

Implementation of

IAssetImporter.unregisterFile

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:247


resolveURL

resolveURL(url): string

Parameters

NameType
urlstring

Returns

string

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:261


importAsset

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

Returns the object or undefined

Parameters

NameType
asset?IAsset
optionsImportAssetOptions
onDownloadProgress?(e: ProgressEvent<EventTarget>) => void

Returns

Promise<ISceneObject<any>[]>

Implementation of

IAssetImporter.importAsset

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:369


importSingle

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

Type parameters

Name
T

Parameters

NameType
asset?string | IAsset
optionsImportAssetOptions

Returns

Promise<undefined | T>

Implementation of

IAssetImporter.importSingle

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:431


importSinglePath

importSinglePath<T>(path, options?): Promise<undefined | T>

Type parameters

NameType
Textends ISceneObject<any>

Parameters

NameType
pathstring
options?ImportAssetOptions

Returns

Promise<undefined | T>

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:435


importPath

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

Parameters

NameType
pathstring
optionsImportAssetOptions

Returns

Promise<ISceneObject<any>[]>

Implementation of

IAssetImporter.importPath

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:438


processImportedSingle

processImportedSingle<T>(res, options?): Promise<T>

Type parameters

NameType
Textends ISceneObject<any>

Parameters

NameType
resany
optionsProcessImportedOptions

Returns

Promise<T>

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:457


processImported

processImported(imported, options?): Promise<any[]>

Parameters

NameType
importedany
optionsProcessImportedOptions

Returns

Promise<any[]>

Implementation of

IAssetImporter.processImported

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:460


dispose

dispose(): void

Returns

void

Implementation of

IAssetImporter.dispose

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:609


clearLoaderCache

clearLoaderCache(): void

Returns

void

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:615


clearCache

clearCache(): void

Clear memory asset and loader cache. Browser cache and custom cache storage is not cleared with this.

Returns

void

Defined in

webgi/src/extras/asset_manager/importer/threejs/AssetImporter.ts:624