Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/snollygolly/textureatlasconverter
A small script to convert texture atlases to different formats.
https://github.com/snollygolly/textureatlasconverter
convert-texture-atlases json kenney texture-atlas texturepacker
Last synced: 28 days ago
JSON representation
A small script to convert texture atlases to different formats.
- Host: GitHub
- URL: https://github.com/snollygolly/textureatlasconverter
- Owner: snollygolly
- Created: 2015-02-23T05:19:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-02-23T05:26:06.000Z (over 9 years ago)
- Last Synced: 2024-10-04T15:37:39.781Z (about 2 months ago)
- Topics: convert-texture-atlases, json, kenney, texture-atlas, texturepacker
- Language: PHP
- Size: 129 KB
- Stars: 15
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
TextureAtlasConverter
===I made this project to convert XML texture atlases to JSON for use in [pixi.js](http://www.pixijs.com)
I downloaded [Kenney's](http://www.kenney.nl/) 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](https://www.codeandweb.com/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!