Class Loader<TData, TUrl>

Base class for implementing loaders.

Type Parameters

  • TData = unknown
  • TUrl = string

Hierarchy (view full)

Constructors

Properties

DEFAULT_MATERIAL_NAME: string
crossOrigin: string
'anonymous'
withCredentials: boolean
false
path: string
''
resourcePath: string
''
requestHeader: {
    [header: string]: string;
}
{}

Methods

  • Parameters

    • url: TUrl
    • onLoad: ((data: TData) => void)
        • (data): void
        • Parameters

          Returns void

    • OptionalonProgress: ((event: ProgressEvent<EventTarget>) => void)
        • (event): void
        • Parameters

          Returns void

    • OptionalonError: ((err: unknown) => void)
        • (err): void
        • Parameters

          • err: unknown

          Returns void

    Returns void

  • Parameters

    Returns Promise<TData>

  • Parameters

    • crossOrigin: string

    Returns this

  • Parameters

    • value: boolean

    Returns this

  • Parameters

    • path: string

    Returns this

  • Parameters

    • resourcePath: string

    Returns this

  • Parameters

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

    Returns this