SpriteSheetHelper, a class to ease sprite sheet animation data generation

Constructor

new()

Methods

@:value({ backgroundColor : 0, transparent : false })generateFromMovieClip(sourceMC:MovieClip, cols:Int, rows:Int, width:Int, height:Int, transparent:Bool = false, backgroundColor:Int = 0):Vector<Texture2DBase>

Generates and returns one or more "sprite sheets" BitmapTexture from a given movieClip

Parameters:

sourceMC

MovieClip: A movieclip with timeline animation

cols

uint: Howmany cells along the u axis.

rows

uint: Howmany cells along the v axis.

width

uint: The result bitmapData(s) width.

height

uint: The result bitmapData(s) height.

transparent

Boolean: if the bitmapData(s) must be transparent.

backgroundColor

uint: the bitmapData(s) background color if not transparent.

Returns:

Vector.<Texture2DBase> The generated Texture2DBase vector for the SpriteSheetMaterial.

@:value({ __to : 0, __from : 0, mapCount : 1 })generateSpriteSheetClipNode(animID:String, cols:Int, rows:Int, mapCount:Int = 1, __from:Int = 0, __to:Int = 0):SpriteSheetClipNode

Returns a SpriteSheetClipNode to pass to animator from animation id , cols and rows.

Parameters:

animID

String:The name of the animation

cols

uint: Howmany cells along the u axis.

rows

uint: Howmany cells along the v axis.

mapCount

uint: If the same animation is spread over more bitmapDatas. Howmany bimapDatas. Default is 1.

from

uint: The offset start if the animation first frame isn't in first cell top left on the map. zero based. Default is 0.

to

uint: The last cell if the animation last frame cell isn't located down right on the map. zero based. Default is 0.

Returns:

SpriteSheetClipNode SpriteSheetClipNode: The SpriteSheetClipNode filled with the data