martinlindhe / php-tiled-tmx
用于读取 Tiled .tmx 地图文件并将其渲染为 JSON 的库
1.1.0
2015-04-16 07:24 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- martinlindhe/php-debughelper: ~0.1
- phpunit/phpunit: ~4.6
- squizlabs/php_codesniffer: ~2.0
README
读取 Tiled .tmx 地图文件的库。
示例
use TiledTmx\JsonMapWriter as Writer; use TiledTmx\Parser; $map = (new Parser)->parseFile('./test/data/testMap1.tmx'); echo Writer::render($map);
可以在 http://www.mapeditor.org/ 下载 Tiled 地图编辑器
Tiled TMX 格式的文档在此处: https://github.com/bjorn/tiled/wiki/TMX-Map-Format
使用方法
为了提高网络性能,请确保您的 Web 服务器已启用生成的输出的 gzip 压缩。