Base class for implementing loaders.

Hierarchy (view full)

Constructors

Properties

crossOrigin: string

Default

'anonymous'
path: string

Default

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

Type declaration

  • [header: string]: string

Default

{}
resourcePath: string

Default

''
withCredentials: boolean

Default

false
DEFAULT_MATERIAL_NAME: string

Methods

  • Parameters

    • url: string
    • Optional onLoad: ((data) => 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<Object3D<Object3DEventMap>>

  • Parameters

    • json: unknown

    Returns {
        [key: string]: AnimationClip;
    }

  • Parameters

    • json: unknown
    • Optional onLoad: (() => void)
        • (): void
        • Returns void

    Returns {
        [key: string]: external.three.Source;
    }

  • Parameters

    • json: unknown

    Returns Promise<{
        [key: string]: external.three.Source;
    }>

  • Parameters

    • json: unknown
    • textures: {
          [key: string]: Texture;
      }

    Returns {
        [key: string]: Material;
    }

  • Parameters

    Returns {
        [key: string]: Texture;
    }

  • Parameters

    • crossOrigin: string

    Returns this

  • Parameters

    • path: string

    Returns this

  • Parameters

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

    Returns this

  • Parameters

    • resourcePath: string

    Returns this

  • Parameters

    • value: boolean

    Returns this