Options
All
  • Public
  • Public/Protected
  • All
Menu

Class used to enable access to offline support

see

https://doc.babylonjs.com/features/featuresDeepDive/scene/optimizeCached

Hierarchy

  • IOfflineProvider

Implemented by

Index

Properties

enableSceneOffline: boolean

Gets a boolean indicating if scene must be saved in the database

enableTexturesOffline: boolean

Gets a boolean indicating if textures must be saved in the database

Methods

  • loadFile(url: string, sceneLoaded: ((data: any) => void), progressCallBack?: ((data: any) => void), errorCallback?: (() => void), useArrayBuffer?: boolean): void
  • Loads a file from offline support

    Parameters

    • url: string

      defines the URL to load from

    • sceneLoaded: ((data: any) => void)

      defines a callback to call on success

        • (data: any): void
        • Parameters

          • data: any

          Returns void

    • Optional progressCallBack: ((data: any) => void)

      defines a callback to call when progress changed

        • (data: any): void
        • Parameters

          • data: any

          Returns void

    • Optional errorCallback: (() => void)

      defines a callback to call on error

        • (): void
        • Returns void

    • Optional useArrayBuffer: boolean

      defines a boolean to use array buffer instead of text string

    Returns void

  • loadImage(url: string, image: HTMLImageElement): void
  • Loads an image from the offline support

    Parameters

    • url: string

      defines the url to load from

    • image: HTMLImageElement

      defines the target DOM image

    Returns void

  • open(successCallback: (() => void), errorCallback: (() => void)): void
  • Open the offline support and make it available

    Parameters

    • successCallback: (() => void)

      defines the callback to call on success

        • (): void
        • Returns void

    • errorCallback: (() => void)

      defines the callback to call on error

        • (): void
        • Returns void

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method

Settings

Theme