Seldszar / spritepack

Yet another spritesheet packer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

spitepack

Yet another spritesheet packer

Table of Contents

Install

$ npm install spitepack

Usage

Create a manifest.json file in the folder containing your sprites following the JSON Schema, then run spritepack.

Here's an example:

{
  "sources": [
    "**/*.{gif,jpg,png,svg}"
  ],
  "frames": [
    {
      "path": "**",
      "anchor": [0.5, 1]
    }
  ],
  "animations": {
    "clap": {
      "frames": [
        {
          "path": "clap/*"
        }
      ]
    },
    "idle": {
      "frames": [
        {
          "path": "idle/*"
        }
      ]
    },
    "jump": {
      "frames": [
        {
          "path": "jump-prepare/*"
        },
        {
          "path": "jump/*"
        },
        {
          "path": "jump-land/*"
        }
      ]
    }
  }
}

Author

Alexandre Breteau - @0xSeldszar

License

MIT © Alexandre Breteau

About

Yet another spritesheet packer

License:MIT License


Languages

Language:JavaScript 100.0%