Skip to main content

Class: AssetImporter

Asset-Management.AssetImporter

Hierarchy

  • SimpleEventDispatcher<"onLoad" | "onProgress" | "onStop" | "onError" | "onStart" | "loaderCreate" | "importFile" | "importFiles">

    AssetImporter

Implements

Properties

Importers

Static Readonly Importers: IImporter[]

Defined in

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

Accessors

processors

get processors(): ObjectProcessorMap<TAssetTypes>

Returns

ObjectProcessorMap<TAssetTypes>

Implementation of

IAssetImporter.processors

Defined in

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


loadingManager

get loadingManager(): LoadingManager

Returns

LoadingManager

Implementation of

IAssetImporter.loadingManager

Defined in

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

Constructors

constructor

new AssetImporter(viewer)

Parameters

NameType
viewerIViewerApp

Overrides

SimpleEventDispatcher.constructor

Defined in

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

Methods

importFiles

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

Parameters

NameType
filesMap<string, IFile>
onProgress?(event: ProgressEvent<EventTarget>) => void
optionsAnyOptions & { allowedExtensions?: string[] }

Returns

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

Implementation of

IAssetImporter.importFiles

Defined in

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


registerFile

registerFile(path, file?): undefined | ILoader

Parameters

NameType
pathstring
file?IFile

Returns

undefined | ILoader

Implementation of

IAssetImporter.registerFile

Defined in

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


unregisterFile

unregisterFile(path): void

Parameters

NameType
pathstring

Returns

void

Implementation of

IAssetImporter.unregisterFile

Defined in

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


resolveURL

resolveURL(url): string

Parameters

NameType
urlstring

Returns

string

Defined in

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


importAsset

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

Returns the object or undefined

Parameters

NameType
asset?IAsset
optionsAnyOptions

Returns

Promise<ISceneObject<any>[]>

Implementation of

IAssetImporter.importAsset

Defined in

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


importSingle

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

Type parameters

Name
T

Parameters

NameType
asset?IAsset
optionsAnyOptions

Returns

Promise<undefined | T>

Implementation of

IAssetImporter.importSingle

Defined in

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


importSinglePath

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

Type parameters

NameType
Textends ISceneObject<any>

Parameters

NameType
pathstring
options?AnyOptions

Returns

Promise<undefined | T>

Defined in

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


importPath

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

Parameters

NameType
pathstring
optionsAnyOptions

Returns

Promise<ISceneObject<any>[]>

Implementation of

IAssetImporter.importPath

Defined in

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


processImportedSingle

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

Type parameters

NameType
Textends ISceneObject<any>

Parameters

NameType
resany
optionsAnyOptions

Returns

Promise<T>

Defined in

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


processImported

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

Parameters

NameType
resany
optionsAnyOptions

Returns

Promise<ISceneObject<any>[]>

Implementation of

IAssetImporter.processImported

Defined in

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


dispose

dispose(): void

Returns

void

Implementation of

IAssetImporter.dispose

Defined in

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


addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
type"onLoad" | "onProgress" | "onStop" | "onError" | "onStart" | "loaderCreate" | "importFile" | "importFiles"
listener(event: IEvent<"onLoad" | "onProgress" | "onStop" | "onError" | "onStart" | "loaderCreate" | "importFile" | "importFiles">) => void

Returns

void

Implementation of

IAssetImporter.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

NameType
type"onLoad" | "onProgress" | "onStop" | "onError" | "onStart" | "loaderCreate" | "importFile" | "importFiles"
listener(event: IEvent<"onLoad" | "onProgress" | "onStop" | "onError" | "onStart" | "loaderCreate" | "importFile" | "importFiles">) => void

Returns

boolean

Implementation of

IAssetImporter.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

NameType
type"onLoad" | "onProgress" | "onStop" | "onError" | "onStart" | "loaderCreate" | "importFile" | "importFiles"
listener(event: IEvent<"onLoad" | "onProgress" | "onStop" | "onError" | "onStart" | "loaderCreate" | "importFile" | "importFiles">) => void

Returns

void

Implementation of

IAssetImporter.removeEventListener

Inherited from

SimpleEventDispatcher.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<"onLoad" | "onProgress" | "onStop" | "onError" | "onStart" | "loaderCreate" | "importFile" | "importFiles">

Returns

void

Implementation of

IAssetImporter.dispatchEvent

Inherited from

SimpleEventDispatcher.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74