Spritesheet.js is command-line spritesheet (a.k.a. Texture Atlas) generator written in node.js.
==============
Fork objective
This version rectifies the problem with its use in PIXI.js where packing assets together and sub-pixel rendering creates artefacts around the assets, especially in tiled textures.
Avoiding this issue with the following:
- create 2px (or otherwise specified) gap between each image
- recalculate the coordinate with the extra 2px at top, bottom, left, right
==============
Supported spritesheet formats###
- Starling / Sparrow
- JSON (i.e. PIXI.js)
- Easel.js
- cocos2d (experimental)
Usage###
- Command LineOptions:$ spritesheet-js assets/*.png$ spritesheet-jsUsage: spritesheet-js [options] <files>Options:-f, --format format of spritesheet [default: "json"]-n, --name name of generated spritesheet [default: "spritesheet"]-p, --path path to export directory [default: "."]--trim removes transparent whitespaces around images [default: false]--square texture should be s square [default: false]--powerOfTwo texture width and height should be power of two [default: false]--algorithm packing algorithm: growing-binpacking , binpacking , vertical or horizontal [default: "growing-binpacking"]--gap2px add 2 px gap around each texture and readjust the coordinates, so each texture are not touching eachother. [default: false]
- Node.jsvar spritesheet = ;;
###Trimming / Cropping###
Spritesheet.js can remove transparent whitespace around images. Thanks to that you can pack more assets into one spritesheet and it makes rendering a little bit faster.
*NOTE: Some libraries such as Easel.js or PIXI.js dont't support this feature.*
![Trimming / Cropping](http://i.imgur.com/76OokJU.png)
###Installation###
1. Install [ImageMagick](http://www.imagemagick.org/)
2. ```npm install spritesheet-js -g```
###Test###
mocha test
--------------
Thanks [Przemysław Piekarski](http://www.behance.net/piekarski) for logo design and assets in examples.