Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CubeTextureAssetTask

Define a task used by AssetsManager to load cube textures

Hierarchy

Implements

Index

Constructors

constructor

  • new CubeTextureAssetTask(name: string, url: string, extensions?: string[] | undefined, noMipmap?: boolean | undefined, files?: string[] | undefined, prefiltered?: boolean | undefined): CubeTextureAssetTask
  • 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)

    • Optional extensions: string[] | undefined

      defines the extensions to use to load files (["_px", "_py", "_pz", "_nx", "_ny", "_nz"] by default)

    • Optional noMipmap: boolean | undefined

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

    • Optional files: string[] | undefined

      defines the explicit list of files (undefined by default)

    • Optional prefiltered: boolean | undefined

    Returns CubeTextureAssetTask

Properties

Optional extensionsSearch playground for extensions

extensions: string[] | undefined

Defines the extensions to use to load files (["_px", "_py", "_pz", "_nx", "_ny", "_nz"] by default)

Optional filesSearch playground for files

files: string[] | undefined

Defines the explicit list of files (undefined by default)

nameSearch playground for name

name: string

Defines the name of the task

Optional noMipmapSearch playground for noMipmap

noMipmap: boolean | undefined

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

onErrorSearch playground for onError

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

Callback called when the task is successful

Type declaration

onSuccessSearch playground for onSuccess

onSuccess: (task: CubeTextureAssetTask) => void

Callback called when the task is successful

Type declaration

Optional prefilteredSearch playground for prefiltered

prefiltered: boolean | undefined

Defines the prefiltered texture option (default is false)

textureSearch playground for texture

texture: CubeTexture

Gets the loaded texture

urlSearch playground for url

url: string

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

Accessors

errorObject

  • get errorObject(): { exception?: any; message?: string }
  • Gets the current error object (if task is in error)

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

    • Optional exception?: any
    • Optional message?: string

isCompleted

  • get isCompleted(): boolean

taskState

Methods

resetSearch playground for reset

  • reset(): void
  • 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

runSearch playground for run

  • run(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void): 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

        • (): void
        • Returns void

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

      is a callback called if an error occurs

        • (message?: string, exception?: any): void
        • Parameters

          • Optional message: string
          • Optional exception: any

          Returns void

    Returns void

runTaskSearch playground for runTask

  • runTask(scene: Scene, onSuccess: () => void, onError: (message?: string, exception?: any) => void): 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

        • (): void
        • Returns void

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

      is a callback called if an error occurs

        • (message?: string, exception?: any): void
        • Parameters

          • Optional message: string
          • Optional exception: any

          Returns void

    Returns void

Legend

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