springroll.pixi.SpineAnimTask Class

SpineAnimTask loads a spine animation and the texture atlas(es) that it needs.

Constructor

springroll.pixi.SpineAnimTask

(
  • asset.spineAnim
  • asset.atlas
  • asset.atlas.type
  • [asset.atlas.atlas]
  • [asset.atlas.image]
  • [asset.atlas.color]
  • [asset.atlas.alpha]
  • [asset.atlas.spineAtlas]
  • [asset.atlas.images]
  • [asset.extraImages]
  • [asset.cache=false]
  • [asset.id]
  • [asset.complete]
)
private

Parameters:

  • asset.spineAnim String

    The Spine skeleton data image path.

  • asset.atlas Object

    The atlas for the skeleton. This can be a Pixi TextureAtlas asset or a Spine specific atlas.

  • asset.atlas.type String

    Must be "pixi" to ensure that the atlas is loaded for Pixi.

  • [asset.atlas.atlas] String optional

    (TextureAtlas) The source data path for a TextureAtlas.

  • [asset.atlas.image] String optional

    (TextureAtlas) A image path for a TextureAtlas

  • [asset.atlas.color] String optional

    (TextureAtlas) The color image path, if not using image property

  • [asset.atlas.alpha] String optional

    (TextureAtlas) The alpha image path, if not using image property

  • [asset.atlas.spineAtlas] String optional

    (Spine Atlas) The source data path for an atlas exported from Spine, with a .txt or .atlas extension.

  • [asset.atlas.images] Array optional

    (Spine Atlas) A set of image paths for the spineAtlas data file to pull from.

  • [asset.extraImages] Object optional

    A dictionary of extra Texture assets to add to the atlas. This should be useful if you have individual images not added to a TextureAtlas.

  • [asset.cache=false] Boolean optional

    If we should cache the result - caching results in caching in the global Pixi texture cache as well as Application's asset cache.

  • [asset.id] String optional

    The id of the task.

  • [asset.complete] Function optional

    The callback to call when the load is completed.

Methods

destroy

()

Defined in destroy:167

Destroy this load task and don't use after this.

start

(
  • callback
)

Defined in start:96

Start the load

Parameters:

  • callback Object

    Callback to call when the load is done

test

(
  • asset
)
Boolean
static

Defined in test:73

Test to see if we should load an asset

Parameters:

  • asset Object

    The asset to test

Returns:

Boolean:

If this qualifies for this task

atlas

String

Defined in atlas:57

The spine atlas data source path

extraImages

String

Defined in extraImages:63

Extra images to be added to the atlas

spineAnim

String

Defined in spineAnim:51

The skeleton data source path