FnF-Spritesheet-and-XML-Maker
FnF-Spritesheet-and-XML-Maker copied to clipboard
If Image Optimization/Clipping is enabled, frame should be recalculated to create the original image.
This is the original intent of the frame attributes, and what Haxe is optimized for.
Say I have a 100x100 image, that contains 80x80 of content with 10px of empty space around it.
A subtexture with a width of 80, a height of 80, a frameX of 10, frameY of 10, a frameWidth of 100, and a frameHeight of 100 will render identically to the original image, while taking up less space in the spritesheet and thus in memory.
The current clipping implementation messes discards the frame information and sets x/y to 0 and w/h to that of the new image. This means that some frames of the animation will be offset from what is expected.
There should be a pr of that tbh
Having to adjust the frameY value of every single image is annoying
Thanks for the information, I was unsure about the exact working of frame attributes at the time but it should be added now in the latest version (Under View > View XML structure, in v4.0)