springroll.LoadTask Class

Extends springroll.Task
Defined in: springroll.LoadTask:9
Module: Core

Internal class for dealing with async load assets through Loader.

Constructor

springroll.LoadTask

(
  • asset
)
private

Parameters:

  • asset Object

    The data properties

    • src String

      The source

    • [cache=false] Boolean optional

      If we should cache the result

    • [id] String optional

      Id of asset

    • [advanced=false] Boolean optional

      If we should return the LoaderResult

    • [data=null] optional

      Optional data

    • [complete=null] Function optional

      The event to call when done

    • [progress=null] Function optional

      The event to call on load progress

    • [sizes=null] Object optional

      Define if certain sizes are not supported

destroy

()

Inherited from springroll.Task but overwritten in destroy:96

Destroy this and discard

filter

(
  • url
)
protected

Inherited from springroll.Task: filter:151

Add the sizing to each filter

Parameters:

  • url String
    The url to filter

load

(
  • source
  • [options]
)
protected

Inherited from springroll.Task: load:176

Pass-through to the Application load method

Parameters:

simpleLoad

(
  • url
  • complete
  • [progress]
  • [data]
)
protected
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
)

Inherited from springroll.Task but overwritten in start:71

Start the task

Parameters:

  • callback Function

    Callback when finished

test

(
  • asset
)
Boolean
static

Defined in test:59

Test if we should run this task

Parameters:

  • asset Object

    The asset to check

Returns:

Boolean:

If the asset is compatible with this asset

advanced

Boolean

Defined in advanced:47

If turned on return a springroll.LoaderResult object instead of the content

Default: false

cache

Boolean

Inherited from springroll.Task: cache:46

If we should cache the load and use later

Default: false

complete

Function

Inherited from springroll.Task: complete:37

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

Default: null

data

Defined in data:41

Optional data to attach to load

id

String

Inherited from springroll.Task: id:54

The task id

original

Object

Inherited from springroll.Task: original:66

Reference to the original asset data

progress

Function

Defined in progress:35

Call on load progress

src

String

Defined in src:29

The source URL to load

status

Int

Inherited from springroll.Task: status:30

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

Default: 0

type

String

Inherited from springroll.Task: type:60

The task type for display filter