springroll.pixi.SpineAtlas Class

Handles an atlas exported from Spine. This class is created during Spine loading, and should probably never be used on its own. Code in this class is pulled from https://github.com/pixijs/pixi-spine/blob/master/src/SpineRuntime/Atlas.js

Constructor

springroll.pixi.SpineAtlas

(
  • atlasText
  • textureDictionary
)

Parameters:

  • atlasText String

    The Spine Atlas data

  • textureDictionary Object

    All of the images required by the atlas.

addImage

(
  • name
  • texture
)

Defined in addImage:179

Adds a standalone image as a page and region

Parameters:

  • name String

    The name of the texture, so it can get recognized by the Spine skeleton data.

  • texture PIXI.Texture

    The loaded texture for the image to add.

destroy

()

Defined in destroy:295

Destroys the SpineAtlas by nulling the image and frame dictionary references.

fromTextureAtlas

(
  • atlas
  • [name]
)

Sets up this SpineAtlas from an instance of our TextureAtlas class to allow for the use of atlases exported from TexturePacker.

Parameters: