Photo Sphere Viewer
    Preparing search index...

    Interface TextureLoader

    Image and texture loading system

    interface TextureLoader {
        config: ParsedViewerConfig;
        state: ViewerState;
        viewer: Viewer;
        blobToImage(blob: Blob): Promise<HTMLImageElement>;
        loadFile(
            url: string,
            onProgress?: (p: number) => void,
            cacheKey?: string,
        ): Promise<Blob>;
        loadImage(
            url: string,
            onProgress?: (p: number) => void,
            cacheKey?: string,
        ): Promise<HTMLImageElement>;
        preloadPanorama(panorama: any): Promise<unknown>;
    }

    Hierarchy

    • AbstractService
      • TextureLoader
    Index

    Properties

    viewer: Viewer

    Methods

    • Loads a Blob with FileLoader

      Parameters

      • url: string
      • OptionalonProgress: (p: number) => void
      • OptionalcacheKey: string

      Returns Promise<Blob>

    • Loads an image with ImageLoader or with FileLoader if progress is tracked or if request headers are configured

      Parameters

      • url: string
      • OptionalonProgress: (p: number) => void
      • OptionalcacheKey: string

      Returns Promise<HTMLImageElement>