0.3.0 • Published 1 year ago

pixi-spritesheet-generator v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Pixi Spritesheet Generator

Generate a spritesheet with a png and a JSON data file from a set of individual sprites that can be used with PixiJS.

Note: Pixi Spritesheet Generator is still in beta. I'm currently using it for my projects but expect to run into issues. Please report any issues and they will be addressed.

Install

npm install pixi-spritesheet-generator

Usage

To generate a spritesheet, you just need to call the command with the sprites to use to generate the spritesheet:

pixi-spritesheet-generator sprite-01.png sprite-02.png sprite-03.png

Or you can use a glob pattern:

pixi-spritesheet-generator *.png

Also, the following options can be passed:

OptionDescriptionDefault Value
-o, --outputThe path to the directory where the spritesheet and data file will be saved.process.cwd()
-t, --trimIndicates whether transparent whitespace around the sprites should be trimmed or not. Note that trimming still needs some work and might be buggy.false
-c, --columnsThe number of columns in the spritesheet. If not provided, the spritesheet will be a single column.1
-d, --declarationIndicates whether a types file should be generated or not. These types include the values of the spritesheet and separate union types of the sprites and animations.false

To use the spritesheet in Pixi, see the Pixi Spritesheet Documentation.

License

MIT

0.3.0

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago