- Install ImageMagick
- Clone and install this repo,
git clone [email protected]:vickylance/ImageMagick-TextureAtlas-to-Sprites-Converter.git
cd ImageMagick-TextureAtlas-to-Sprites-Converter
yarn
- Go to Leshy Spritesheet Tool
- Upload a Texture Atlas.
- Hit the
Remap
button. - (Optional) Combine any sprites that u want in the editor (Hold Shift + LMB). (Hint: Click the Checkered BG checkbox)
- (Optional) Delete any unwanted or redundant sprites.
- Hit
Optimize
button. - Hit
Repack
button. - (Optional) Change any names of of the sprites you want. (Hint: Click the show labels checkbox)
- Give a name to the spritesheet and hit the
Save
button. - Select
JSON
from the dropdown below and give a name to the json file and hitSave
.
$ node converter.js
? Path to your input spritesheet? ./flappy.png
? Path to your JSON file? ./flappy.json
? Path to your output folder? out/
Your input is:
Input Spritesheet: /Users/sds-s.vignesh/Projects/personal-projects/Phaser/flappy-bird/flappy.png
Input JSON File: /Users/sds-s.vignesh/Projects/personal-projects/Phaser/flappy-bird/flappy.json
Output folder: /Users/sds-s.vignesh/Projects/personal-projects/Phaser/flappy-bird/out