make3d
    Preparing search index...

    Class Loader

    Hierarchy

    • LoadingManager
      • Loader
    Index

    Constructors

    • Parameters

      • OptionalonLoad: () => void
      • OptionalonProgress: (url: string, loaded: number, total: number) => void
      • OptionalonError: (url: string) => void

      Returns Loader

    Properties

    abort: () => this
    abortController: AbortController
    addHandler: (regex: RegExp, loader: Loader) => this
    fbxLoader?: FBXLoader
    getHandler: (file: string) => Loader<unknown, string>
    gltfLoader?: GLTFLoader
    itemEnd: (url: string) => void
    itemError: (url: string) => void
    itemStart: (url: string) => void
    onError: (url: string) => void

    Will be called when item loading fails. The default is a function with empty body.

    Type Declaration

      • (url: string): void
      • Parameters

        • url: string

          The url of the item that errored.

        Returns void

    onLoad: () => void

    Will be called when all items finish loading. The default is a function with empty body.

    onProgress: (url: string, loaded: number, total: number) => void

    Will be called for each loaded item. The default is a function with empty body.

    Type Declaration

      • (url: string, loaded: number, total: number): void
      • Parameters

        • url: string

          The url of the item just loaded.

        • loaded: number

          The number of items already loaded so far.

        • total: number

          The total amount of items to be loaded.

        Returns void

    onStart: (url: string, loaded: number, total: number) => void

    Will be called when loading of an item starts.

    Type Declaration

      • (url: string, loaded: number, total: number): void
      • Parameters

        • url: string

          The url of the item that started loading.

        • loaded: number

          The number of items already loaded so far.

        • total: number

          The total amount of items to be loaded.

        Returns void

    removeHandler: (regex: RegExp) => this
    resolveURL: (url: string) => string

    Given a URL, uses the URL modifier callback (if any) and returns a resolved URL. If no URL modifier is set, returns the original URL.

    Type Declaration

      • (url: string): string
      • Parameters

        • url: string

          the url to load

        Returns string

    setURLModifier: (callback?: (url: string) => string) => this

    If provided, the callback will be passed each resource URL before a request is sent. The callback may return the original URL, or a new URL to override loading behavior. This behavior can be used to load assets from .ZIP files, drag-and-drop APIs, and Data URIs.

    Type Declaration

      • (callback?: (url: string) => string): this
      • Parameters

        • Optionalcallback: (url: string) => string

          URL modifier callback. Called with url argument, and must return resolvedURL.

        Returns this

    textureLoader?: TextureLoader
    tgaLoader?: boolean
    DRACO_LOADER_PATH: "https://www.gstatic.com/draco/versioned/decoders/1.5.7/" = 'https://www.gstatic.com/draco/versioned/decoders/1.5.7/'

    Methods

    • Parameters

      • path: string

      Returns Promise<any>