Holds information regarding a single frame of the animation

Constructor

new(index:Int, ?frameBitmapData:BitmapData, ?nineSlices:NineSliceSlices, ?renderWidth:Int, ?renderHeight:Int, ?sprite:Aseprite, ?frame:Frame)

Frame constructor

Parameters:

index
frameBitmapData
nineSlices
renderWidth
renderHeight
sprite
null

frame

Variables

bitmapData:BitmapData

Frame's bitmap data

read onlyduration:Int

Duration of the frame in milliseconds

read onlyframe:Frame

Raw frame data parsed from the file

read onlyindex:Int

Frame index in the sprite

read onlylayers:Array<LayerDef>

Sprite layers

read onlylayersMap:Map<String, LayerDef>

Map of the sprite layers keyed by their names

read onlytags:Array<String>

Array of tags this frame is tagged with

Methods

copy(?slice:Slice, ?spriteWidth:Int, ?spriteHeight:Int):Frame

Creates a copy of the frame reusing the resources

Parameters:

slicel

Slice to cut from the original sprite

spriteWidth

Width of the resulting frame

spriteHeight

Height of the resulting frame

resize(newWidth:Int, newHeight:Int):Void

Resize the frame

Parameters:

newWidth

New width of the frame

newHeight

New height of the frame