Class CubeTextureAssetTask
Hierarchy (View Summary)
- AbstractAssetTask
- CubeTextureAssetTask
Implements
Constructors
constructor
-
new CubeTextureAssetTask(
name: string,
url: string,
extensionsOrOptions?: Nullable<string[] | ICubeTextureCreationOptions>,
noMipmap?: boolean,
files?: string[],
prefiltered?: boolean,
): CubeTextureAssetTaskCreates 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: booleandefines if mipmaps should not be generated (default is false)
Optionalfiles: string[]defines the explicit list of files (undefined by default)
Optionalprefiltered: boolean
Returns CubeTextureAssetTask
- name: string
Properties
extensions Or Options
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
Optionalfiles
Defines the explicit list of files (undefined by default)
name
Defines the name of the task
Optionalno Mipmap
Defines if mipmaps should not be generated (default is false)
on Error
Callback called when the task is successful
on Success
Callback called when the task is successful
Optionalprefiltered
Defines the prefiltered texture option (default is false)
texture
Gets the loaded texture
url
Defines the location of the files to load (You have to specify the folder where the files are + filename with no extension)
Accessors
error Object
-
get errorObject(): { exception?: any; message?: string }
Gets the current error object (if task is in error)
Returns { exception?: any; message?: string }
is Completed
-
get isCompleted(): boolean
Get if the task is completed
Returns boolean
task State
-
Gets the current state of the task
Returns AssetTaskState
Methods
reset
-
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
run
-
run(
scene: Scene,
onSuccess: () => void,
onError: (message?: string, exception?: any) => void,
): voidExecute 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
- scene: Scene
run Task
-
runTask(
scene: Scene,
onSuccess: () => void,
onError: (message?: string, exception?: any) => void,
): voidExecute 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
- scene: Scene
Define a task used by AssetsManager to load cube textures