Class AssetImporter

Asset Importer

Utility class to import assets from local files, blobs, urls, etc. Used in AssetManager to import assets. Acts as a wrapper over three.js LoadingManager and adds support for dynamically loading loaders, caching assets, better event dispatching and file tracking.

Hierarchy

Implements

Constructors

Properties

_rootContext?: { path: string; rootUrl: string }
importers: IImporter[] = ...

Accessors

Methods

  • Adds a listener to an event type.

    Type Parameters

    • T extends keyof IAssetImporterEventMap

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<IAssetImporterEventMap[T], T, AssetImporter>

      The function that gets called when the event is fired.

    Returns void