API

Class AbstractAssetTaskAbstract

Define an abstract asset task used with a AssetsManager class to load assets into a scene

Hierarchy (View Summary)

Index
name: string

Task name

onError: (task: any, message?: string, exception?: any) => void

Callback called when the task is not successful

onSuccess: (task: any) => void

Callback called when the task is successful

  • Reset will set the task state back to INIT, so the next load call of the assets manager will execute this task again. This can be used with failed tasks that have the reason for failure fixed.

    Returns void

  • Execute the current task

    Parameters

    • scene: Scene

      defines the scene where you want your assets to be loaded

    • onSuccess: () => void

      is a callback called when the task is successfully executed

    • onError: (message?: string, exception?: any) => void

      is a callback called if an error occurs

    Returns void

  • Execute the current task

    Parameters

    • scene: Scene

      defines the scene where you want your assets to be loaded

    • onSuccess: () => void

      is a callback called when the task is successfully executed

    • onError: (message?: string, exception?: any) => void

      is a callback called if an error occurs

    Returns void