A small script to convert texture atlases to different formats.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
convert.php

README.md

TextureAtlasConverter

I made this project to convert XML texture atlases to JSON for use in pixi.js

I downloaded Kenney's numerous game asset packages (which I highly recommend), but all of them came with only an .XML texture atlas. If you have all the separate PNGs, you can generate your own with TexturePacker, but that's kind of a pain. I made this script to do it for me.

Currently it accepts an .XML texture atlas file, and outputs a .JSON texture atlas file (I modeled it off of TexturePacker's "JSON Hash" output).

It was built with PHP 5.5.14

Usage:

php convert.php TextureAtlas.xml

and it will output a JSON in the same folder. Easy peasy!