Closed covercash2 closed 5 years ago
Hey, thanks for the report! Would you like to submit your fix for the panic, so we can fix one after another?
I've got a fork with the fix, I'll submit it when I get home. it basically just turns the binary search into a dumb iterative search, but I thought that would be fine for a default packer.
the issue with the pictures overlapping is with the binning algorithm. i'm trying to figure out which one we're trying to implement here. if you could let me know it would be easier for me to spot.
my assumption right now is that this algorithm doesn't work for non-squares or possibly non-uniform sizes. for now, i'm going to try a different algorithm, just to see if i can get my own assets to work. down the road, it could be sheep could support a few different algorithms ¯\(ツ)/¯
i found if i reverse the compare_area
function so that it sorts from largest to smallest i can get a good result. i did remove one of the images, the font image, that was problematic, and now i don't have a copy of it, so there may still be a bug. i'm pretty sure, though, that we want to sort the sprites from largest to smallest.
using the default CLI packer, i couldn't pack all my assets (just as a test). turns out it was failing a binary search because the Sprite Anchors weren't sorted. however, fixing that bug revealed another bug where the sprites were packed on top of another. example