An aseprite class.

Primarily made to keep track of an hxd.fs.FileEntry.

Available since

0.1.0

.

Static methods

staticfromEntry(e:FileEntry):Ase

Returns an nb.Ase instance using an hxd.fs.FileEntry.

Parameters:

e

The hxd.fs.FileEntry to make the instance with. (That you can get using hxd.Res.[file].entry for example.)

Returns:

An instance of ase.Ase made from e.

Variables

read onlyentry:FileEntry

The hxd.fs.FileEntry that was used to make this instance.

Inherited Variables

Defined by Ase

read onlycolorDepth:ColorDepth

Read-only color depth of the file

read onlyfileSize:Int

Files size in bytes

read onlyfirstFrame:Frame

@:value([])frames:Array<Frame> = []

height:Int

Sprite height

@:value([])finallayers:Array<Layer> = []

width:Int

Sprite width

Inherited Methods

Defined by Ase

@:value({ duration : 100, copyPrev : false })addFrame(copyPrev:Bool = false, duration:Int = 100):Frame

Add a frame to the sprite

Parameters:

copyPrev

if true will copy all the cel from the previous frame

duration

Duration of the frame in milliseconds

@:value({ editable : true, visible : true })addLayer(?name:String, visible:Bool = true, editable:Bool = true):Ase

Create a new layer

Parameters:

name

(optional) Name for the new layer. If not specified Layer N will be used where N is the amount of currently existing layers + 1

visible

(optional, default true)

editable

(optional, default true)

initPalette(colors:Array<Int>):Void

Initialize the pallet

Parameters:

colors

Array of RGBA color values for the new pallet