Interface Frame

A frame definition within a frames object when selecting Hash format during export in Aseprite. This is the same as the ArrayFrame type but without its additional ArrayFrame.filename property because the filename is the object key in Hash format.

interface Frame {
    duration: number;
    frame: Rectangle;
    rotated: boolean;
    sourceSize: Size;
    spriteSourceSize: Rectangle;
    trimmed: boolean;
}

Hierarchy

Properties

duration: number

The frame duration in milliseconds.

frame: Rectangle

Rectangle of the frame within the sprite sheet image.

rotated: boolean

True if frame is rotated within the sprite sheet image to save space. As far as I know Aseprite doesn't support this so this is always false.

sourceSize: Size

The actual frame (sprite) size.

spriteSourceSize: Rectangle

The trimmed rectangle within the sprite. Will be the same as sourceSize with coordinates x=0 y=0 when frame is not trimmed.

trimmed: boolean

True if frame was trimmed by selecting "Trim Sprite" or "Trim Cels" in Aseprite.

Generated using TypeDoc