API

Class CubeTextureAssetTask

Define a task used by AssetsManager to load cube textures

Hierarchy (View Summary)

Implements

Index
  • Creates a new CubeTextureAssetTask

    Parameters

    • name: string

      defines the name of the task

    • url: string

      defines the location of the files to load (You have to specify the folder where the files are + filename with no extension)

    • extensionsOrOptions: Nullable<string[] | ICubeTextureCreationOptions> = null

      defines the suffixes add to the picture name in case six images are in use like _px.jpg or set of all options to create the cube texture

    • OptionalnoMipmap: boolean

      defines if mipmaps should not be generated (default is false)

    • Optionalfiles: string[]

      defines the explicit list of files (undefined by default)

    • Optionalprefiltered: boolean

    Returns CubeTextureAssetTask

extensionsOrOptions: Nullable<string[] | ICubeTextureCreationOptions> = null

Defines the suffixes add to the picture name in case six images are in use like _px.jpg or set of all options to create the cube texture

files?: string[]

Defines the explicit list of files (undefined by default)

name: string

Defines the name of the task

noMipmap?: boolean

Defines if mipmaps should not be generated (default is false)

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

Callback called when the task is successful

onSuccess: (task: CubeTextureAssetTask) => void

Callback called when the task is successful

prefiltered?: boolean

Defines the prefiltered texture option (default is false)

texture: CubeTexture

Gets the loaded texture

url: string

Defines the location of the files to load (You have to specify the folder where the files are + filename with no extension)

  • get errorObject(): { exception?: any; message?: string }

    Gets the current error object (if task is in error)

    Returns { exception?: any; message?: string }

  • 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