Base class for implementing loaders.

Hierarchy (view full)

  • Loader<string | ArrayBuffer>
    • FileLoader

Constructors

Properties

crossOrigin: string

Default

'anonymous'
mimeType: undefined | MimeType
path: string

Default

''
requestHeader: {
    [header: string]: string;
}

Type declaration

  • [header: string]: string

Default

{}
resourcePath: string

Default

''
responseType: undefined | string
withCredentials: boolean

Default

false
DEFAULT_MATERIAL_NAME: string

Methods

  • Parameters

    • url: string
    • Optional onLoad: ((data) => void)
        • (data): void
        • Parameters

          • data: string | ArrayBuffer

          Returns void

    • Optional onProgress: ((event) => void)
        • (event): void
        • Parameters

          • event: ProgressEvent<EventTarget>

          Returns void

    • Optional onError: ((err) => void)
        • (err): void
        • Parameters

          • err: unknown

          Returns void

    Returns void

  • Parameters

    • url: string
    • Optional onProgress: ((event) => void)
        • (event): void
        • Parameters

          • event: ProgressEvent<EventTarget>

          Returns void

    Returns Promise<string | ArrayBuffer>

  • Parameters

    • crossOrigin: string

    Returns this

  • Parameters

    • mimeType: MimeType

    Returns FileLoader

  • Parameters

    • path: string

    Returns this

  • Parameters

    • requestHeader: {
          [header: string]: string;
      }
      • [header: string]: string

    Returns this

  • Parameters

    • resourcePath: string

    Returns this

  • Parameters

    • responseType: string

    Returns FileLoader

  • Parameters

    • value: boolean

    Returns this