Free Texture Packer for Solar2D (HTML/WIN)

For those interested in the Free Texture Packer tool.

I just made a build Solar2D support based on Free Texture Packer , currently only web and windows version.

8 Likes

That’s great! Thank you.

Added this to awesome-solar2d list.

2 Likes

I’ve been using Free Texture Packer for all of my projects for quite some time. I’ve created a custom-format script that outputs the parameters table, ready for use in a Solar2D image sheet. It automatically generates the options table, making it easy to integrate into your workflow.

To apply it, simply:

  1. Select custom in the Format dropdown on the right panel.
  2. Paste the following script into the content field:
{ -- {{config.imageFile}}
  frames = {
    {{#rects}}
    { -- {{{name}}}
      x={{frame.x}}, y={{frame.y}}, width={{frame.w}}, height={{frame.h}} }{{^last}},{{/last}}
    {{/rects}}
  },
  sheetContentWidth={{config.imageWidth}},
  sheetContentHeight={{config.imageHeight}}
}
1 Like

FreeTexturePacker doesn’t allow exporting Lua files and ImageSheet files in 2 separate folders, which is quite annoying for me because I have to export and then move them to the right place. So I customized it to suit Solar2D better, although the current windows version is quite annoying when opening files from inside the tool. :sweat_smile:
image

1 Like