springroll.Task Class
Internal class for dealing with async load assets
Constructor
springroll.Task
private
Parameters:
-
asset
Object
-
[id=null]
String
optional
-
[cache=false]
Boolean
optional
If we should cache the result
-
[complete=null]
Function
optional
-
[sizes=null]
Object
optional
Define if certain sizes are not supported.
-
fallbackId
String
The ID to set if no ID is explicitly set
this can be used for caching something that has no id
filter
protected
Add the sizing to each filter
load
protected
Pass-through to the Application load method
simpleLoad
(
-
url
-
complete
-
[progress]
-
[data]
)
protected
Pass-through to the Application Loader.load
cache
Boolean
If we should cache the load and use later
Default: false
complete
Function
The user call to fire when completed, returns the arguments
result, original, and additionalAssets
Default: null
FINISHED
Int
final
static
Status for task is finished
Default: 2
original
Object
Reference to the original asset data
RUNNING
Int
final
static
Task is currently being run
Default: 1
status
Int
The current status of the task (waiting, running, etc)
Default: 0
type
String
The task type for display filter
WAITING
Int
final
static
Status for waiting to be run
Default: 0