Defines the file loader for the viewer.

interface ILoader {
    name?: string;
    cancel(): void;
    dispose(): void;
    isSupport(file: FileSource, format?: string): boolean;
    load(
        file: FileSource,
        format?: string,
        params?: LoadParams,
    ): Promise<ILoader>;
}

Properties

Methods

Properties

name?: string

The name of the loader.

Methods

  • Cancels asynchronous loading started with load().

    Returns void

  • Releases resources allocated by the loader.

    Returns void

  • Returns true if the specified file can be loaded by this loader.

    Parameters

    • file: FileSource

      File to load.

    • Optionalformat: string

      File format string.

    Returns boolean