Gamefroot Texture Packer
Generate high quality texture atlases in Node.js, developed for Gamefroot.com and Kiwi.js.
Features
- Use growing-binpacking to optimise your texture memory
- Trim, scale and pad assets to further make use of space
- Add gutter (bleed) to your images to avoid nasty join lines
- Add a maximum width/height to conform to platform limitations
- Generate as many atlases as you need with a single command
- Use texture groups to ensure optimal run-time performance
Supported spritesheet formats
- Kiwi.js
- Starling / Sparrow
- JSON (i.e. PIXI.js)
- Easel.js
- cocos2d
- CSS (new!)
Usage
Command Line
$ gf-pack assets/*.png
Options:
$ gf-packUsage: gf-pack [options] <files> Options: -f, --format format of spritesheet [default: ""] --cf, --customFormat path to external format template [default: ""] -n, --name name of generated spritesheet [default: "spritesheet"] -p, --path path to export directory [default: "."] -w, --width The maximum width of the generated image, required
Node.js
var packer = ; ;
Installation
- Install ImageMagick
npm install gamefroot-texture-packer -g
Test
mocha test
This library is based on the foundation work of Spritesheet.js