springroll.pixi.SpineAtlasTask Class

Internal class for loading a texture atlas in the format exported by Spine.

Constructor

springroll.pixi.SpineAtlasTask

(
  • asset
)
private

Parameters:

  • asset Object

    The data properties

    • type String

      Must be "pixi" to signify that this asset should be parsed specifically for Pixi.

    • spineAtlas String

      The Spine Atlas source data url - a .txt or .atlas file.

    • images Object

      A number of Texture assets, as referenced by the Atlas data. The property used to index each asset in asset.images should be the file name used in the Atlas data.

    • [cache=false] Boolean optional

      If we should cache the result

    • [id] String optional

      Id of asset

    • [complete] Function optional

      The event to call when done

    • [sizes=null] Object optional

      Define if certain sizes are not supported

destroy

()

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

loadImage

(
  • assets
  • done
  • [ignoreCacheSetting]
)

Load the texture from the properties

Parameters:

  • assets Object

    The assets object to load

  • done Function

    Callback when complete, returns new TextureAtlas

  • [ignoreCacheSetting] Boolean optional

    If the setting to cache results should be ignored because this task is still returning stuff to another task.

start

(
  • callback
)

Inherited from springroll.pixi.TextureTask but overwritten in start:63

Start the task

Parameters:

  • callback Function

    Callback when finished

test

(
  • asset
)
Boolean
static

Defined in test:48

Test if we should run this task

Parameters:

  • asset Object

    The asset to check

Returns:

Boolean:

If the asset is compatible with this asset

alpha

String

The atlas alpha source path

color

String

The atlas color source path

image

String

The atlas source path

spineAtlas

String

Defined in spineAtlas:36

The Spine Atlas data source path

uploadToGPU

Boolean

If the texture should be uploaded to the GPU immediately.