API

Class Database

Class used to enable access to IndexedDB

Implements

Index
  • Creates a new Database

    Parameters

    • urlToScene: string

      defines the url to load the scene

    • callbackManifestChecked: (checked: boolean) => any

      defines the callback to use when manifest is checked

    • disableManifestCheck: boolean = false

      defines a boolean indicating that we want to skip the manifest validation (it will be considered validated and up to date)

    Returns Database

IDBStorageEnabled: boolean = false

Gets a boolean indicating if Database storage is enabled (off by default)

  • Loads a file from database

    Parameters

    • url: string

      defines the URL to load from

    • sceneLoaded: (data: any) => void

      defines a callback to call on success

    • OptionalprogressCallBack: (data: any) => void

      defines a callback to call when progress changed

    • OptionalerrorCallback: () => void

      defines a callback to call on error

    • OptionaluseArrayBuffer: boolean

      defines a boolean to use array buffer instead of text string

    Returns void

  • Open the database and make it available

    Parameters

    • successCallback: () => void

      defines the callback to call on success

    • errorCallback: () => void

      defines the callback to call on error

    Returns void