Open kiafaldorius opened 11 years ago
have you used smart layout? http://compass-style.org/help/tutorials/spriting/sprite-layouts/#smart
I saw it last night when I skimmed through the code. But...I don't think it's very smart.
Here's a quick example, each colored square is a file:
Should be able to do better than that. Maybe not, I'm not sure. But I'm willing to give it a shot. In the interest of not re-inventing the wheel, I'd probably go searching up other css spriters first, someone's got to have figured something out by now...
so we have this idea of efficiency which will make the packer scan more and do what you want I think. this could be pulled out into a config and or refactored. I'm not against making this better but, just realize there is a trade off on size / speed.
I'm thinking I might want to spend an afternoon next week looking for and/or implementing a better packing algorithm for the sprites.
Is there any interest in it? Do you think it would be worth while to have a much slower, but much less-whitespacey spriter?
Might still spend a couple hours on it regardless of your answer...just wanted to hear your take on it, seems the spriting stuff hasn't been touched in 2 years...