Closed vlidholt closed 9 years ago
Hmm. Might not be as trivial as I thought previously. The existing code doesn't really handle borders, it just increases the texture size by 2 pixels. https://github.com/spritebuilder/SpriteBuilder/blob/develop/SpriteBuilder/libs/Tupac/TexturePacker.cpp#L301
We'll have to refactor it a bit, but it still shouldn't be too hard. Though I thought maybe it would be as simple as changing input parameters.
Fixed problem with spritesheet .plist files containing suffixed filenames. They also sometimes contained multiple resolutions since the different resolutions shared the same temporary directory.
I implemented packing the rects to have a divisor. Can't really use it yet since there is no UI to enable auto-scaled images. It has only been tested by hardcoding the padding/divisor to 4.
I also changed the padding behavior slightly, but it wasn't used externally. Instead of padding all sides of a rect by the padding amount, it uses it as the minimum padding between frames or the texture edge. Otherwise we would have been wasting more space with larger padding amounts for auto-scaled sprite sheets.
Everything should be ready to support publishing rescalable assets. We just need to implement the UI to enable it. I made a new issue for that. https://github.com/spritebuilder/SpriteBuilder/issues/1576
Publishing sprite sheets need to work with the new asset loading system.