Class ContainerAssetTask
Hierarchy
-
AbstractAssetTask
- ContainerAssetTask
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Creates a new ContainerAssetTask
Parameters
-
name: string
defines the name of the task
-
meshesNames: any
defines the list of mesh's names you want to load
-
rootUrl: string
defines the root url to use as a base to load your meshes and associated resources
-
sceneFilename: string | File
defines the filename or File of the scene to load from
Returns ContainerAssetTask
-
Properties
loaded Animation GroupsSearch playground for loadedAnimationGroups
Gets the list of loaded animation groups
loaded ContainerSearch playground for loadedContainer
Get the loaded asset container
loaded MeshesSearch playground for loadedMeshes
Gets the list of loaded meshes
loaded Particle SystemsSearch playground for loadedParticleSystems
Gets the list of loaded particle systems
loaded SkeletonsSearch playground for loadedSkeletons
Gets the list of loaded skeletons
meshes NamesSearch playground for meshesNames
Defines the list of mesh's names you want to load
nameSearch playground for name
Defines the name of the task
on ErrorSearch playground for onError
Callback called when the task is successful
Type declaration
-
-
Parameters
-
task: ContainerAssetTask
-
Optional message: string
-
Optional exception: any
Returns void
-
-
on SuccessSearch playground for onSuccess
Callback called when the task is successful
Type declaration
-
-
Parameters
-
task: ContainerAssetTask
Returns void
-
-
root UrlSearch playground for rootUrl
Defines the root url to use as a base to load your meshes and associated resources
scene FilenameSearch playground for sceneFilename
Defines the filename or File of the scene to load from
Accessors
error Object
-
Gets the current error object (if task is in error)
Returns { exception?: any; message?: string }
-
Optional exception?: any
-
Optional message?: string
-
is Completed
-
Get if the task is completed
Returns boolean
task State
-
Gets the current state of the task
Returns AssetTaskState
Methods
resetSearch playground for 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
runSearch playground for run
-
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
-
-
Returns void
-
-
-
onError: (message?: string, exception?: any) => void
is a callback called if an error occurs
-
-
Parameters
-
Optional message: string
-
Optional exception: any
Returns void
-
-
-
Returns void
-
run TaskSearch playground for runTask
-
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
-
-
Returns void
-
-
-
onError: (message?: string, exception?: any) => void
is a callback called if an error occurs
-
-
Parameters
-
Optional message: string
-
Optional exception: any
Returns void
-
-
-
Returns void
-
Define a task used by AssetsManager to load assets into a container