Class EquiRectangularCubeTextureAssetTask
Hierarchy (View Summary)
- AbstractAssetTask
- EquiRectangularCubeTextureAssetTask
Implements
Constructors
constructor
-
new EquiRectangularCubeTextureAssetTask(
name: string,
url: string,
size: number,
noMipmap?: boolean,
gammaSpace?: boolean,
superSample?: boolean,
): EquiRectangularCubeTextureAssetTaskCreates a new EquiRectangularCubeTextureAssetTask object
Parameters
- name: string
defines the name of the task
- url: string
defines the location of the file to load
- size: number
defines the desired size (the more it increases the longer the generation will be) If the size is omitted this implies you are using a preprocessed cubemap.
- noMipmap: boolean = false
defines if mipmaps should not be generated (default is false)
- gammaSpace: boolean = true
specifies if the texture will be used in gamma or linear space
- superSample: boolean = false
specifies if the texture will be generated with super sampling (default is false) (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is true)
Returns EquiRectangularCubeTextureAssetTask
- name: string
Properties
gamma Space
[true] Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is true)
name
Defines the name of the task
no Mipmap
[false] 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
size
Defines the desired size (the more it increases the longer the generation will be)
super Sample
specifies if the texture will be generated with super sampling (default is false) (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space) (default is true)
texture
Gets the loaded texture
url
Defines the location of the file to load
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 Equirectangular cube textures