springroll.Task Class

Defined in: springroll.Task:10
Module: Core

Internal class for dealing with async load assets

Constructor

springroll.Task

(
  • asset
  • fallbackId
)
private

Defined in springroll.Task:10

Parameters:

  • asset Object

    The asset data

    • [id=null] String optional

      The task ID

    • [cache=false] Boolean optional

      If we should cache the result

    • [complete=null] Function optional

      Call when complete

    • [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

destroy

()

Defined in destroy:202

Destroy this and discard

filter

(
  • url
)
protected

Defined in filter:151

Add the sizing to each filter

Parameters:

  • url String

    The url to filter

load

(
  • source
  • [options]
)
protected

Defined in load:176

Pass-through to the Application load method

Parameters:

simpleLoad

(
  • url
  • complete
  • [progress]
  • [data]
)
protected

Defined in simpleLoad:188

Pass-through to the Application Loader.load

Parameters:

  • url String

    Path to file to load

  • complete Function

    The callback

  • [progress] Function optional

    The load progress

  • [data] Object optional

    Additiona data

start

(
  • callback
)

Defined in start:141

Start the task

Parameters:

  • callback Function

    Callback when finished

cache

Boolean

Defined in cache:46

If we should cache the load and use later

Default: false

complete

Function

Defined in complete:37

The user call to fire when completed, returns the arguments result, original, and additionalAssets

Default: null

FINISHED

Int final static

Defined in FINISHED:131

Status for task is finished

Default: 2

id

String

Defined in id:54

The task id

original

Object

Defined in original:66

Reference to the original asset data

RUNNING

Int final static

Defined in RUNNING:121

Task is currently being run

Default: 1

status

Int

Defined in status:30

The current status of the task (waiting, running, etc)

Default: 0

type

String

Defined in type:60

The task type for display filter

WAITING

Int final static

Defined in WAITING:111

Status for waiting to be run

Default: 0