Open Adolio opened 7 years ago
Hi, There is no solution to fully support the starling texture atlas yet, subtexture will be dislocated regardless of whether the code is open or not, the best solution is to tirm images before the package in texturepacker, or use DragonBones Pro to manager texture atlases.
I finally found the time give a try to implement this feature... and here it is: https://github.com/Adolio/DragonBonesAS/commit/aa8c3571fbb647bc576555ce12ce881761ab5f36
It seems to work pretty well for me (for both standard textures & meshes) 🙂
In order to fully support the "Trim mode" of TexturePacker, the code will require some further implementation in the Slot logic.
The "Trim" option helps to win precious surface on the texture atlases by removing transparent pixels. It would be a real plus to finish its support in DragonBonesAS.
Thanks in advance!
TODO references in the code: https://github.com/DragonBones/DragonBonesAS/blob/450d4d3013592cedd2803476e9134190b8d3e759/Starling/Starling_1.x/src/dragonBones/starling/StarlingTextureAtlasData.as#L26 https://github.com/DragonBones/DragonBonesAS/blob/450d4d3013592cedd2803476e9134190b8d3e759/Starling/Starling_2.x/src/dragonBones/starling/StarlingTextureAtlasData.as#L26