houmain / spright

An advanced sprite sheet packer and sprite annotator.
GNU General Public License v3.0
51 stars 10 forks source link

Add options from this tool #11

Closed paulocoutinhox closed 2 months ago

paulocoutinhox commented 3 months ago

Hi,

This tool is what i use for my games: https://free-tex-packer.com/app/

You can add their options, example:

Thanks.

houmain commented 3 months ago

Hi, thanks for the suggestions,

One can use id "{{ source.filenameBase }}" now for easily generating sprite IDs from filenames without the extension, or id "{{ source.filenameStem }}" for also removing the folder names.

I also added a base64 function to the template functions. It can be added like this in the .inja file:

<key>textureData</key>
<string>{{ base64(texture.path + "/" + texture.filename) }}</string>
paulocoutinhox commented 2 months ago

Your suggestions works for me.

paulocoutinhox commented 2 months ago

My game made with this: https://paulocoutinho.pages.dev/gamemania/home/