-
Notifications
You must be signed in to change notification settings - Fork 15
Texture Packer
loudoweb edited this page Aug 16, 2016
·
3 revisions
dependency:
haxelib install openfl
haxelib install tilelayer
for openfl 3 | haxelib install openfl-atlas
for openfl >= 4.0.2
You can use many different atlases. SpriterHaxeEngine generates Tilesheet from:
Custom Sparrow tilesheet definition xml. Has smaller tags and attributes name and use positive value for FrameX/FrameY
Create the xml with TexturePacker: In TexturePacker preferences, set texturePackerExporter folder as your custom exporter directory or copy spriterhaxeengine folder to your custom exporter directory.
Parse the xml to use in your project:
AtlasUtil.getCustomSparrowTilesheet(atlasImage, xml);//openfl 3
new SpriterTileSet(atlasImage, xml);//openfl 4 (with [openfl-atlas](https://github.com/loudoweb/openfl-atlas) dependency)
Allow to use the json file exported from Spriter.
AtlasUtil.getSpriterTilesheet(atlasImage, json);//openfl 3
//coming soon to openfl 4 with openfl-atlas dependency