1.2.6 • Published 6 months ago

@pixelation/aseprite v1.2.6

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

@pixelation/aseprite

A library for parsing Aseprite files.

Installation

npm install @pixelation/aseprite

Usage

To parse an Aseprite file, create a new instance of the Aseprite class with the file provided as an array buffer.

import { Aseprite } from "@pixelation/aseprite";

const response = await fetch("./example.aseprite");
const file = await response.arrayBuffer();

const sprite = new Aseprite(file);

Sprite data is now accessible from this instance.

// Contains information about the whole file.
sprite.header;

// Contains information about each frame in the file.
sprite.frames;

// Contains the file's palette (if one exists).
sprite.palette;

// For example to work with each frame in the image.
for (const frame of sprite.frames) {
    // Do something with each frame...
}
1.2.6

6 months ago

1.2.5

10 months ago

1.2.4

10 months ago

1.2.3

10 months ago

1.2.2

10 months ago

1.2.1

11 months ago

1.2.0

12 months ago

1.1.0

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago