https://notabug.org/coz/Lovelas
Lovelas: texture atlas generation library for LÖVE
Notes on usage:
- Include atlas.lua somewhere in your project
- Require it
- Create new atlas object using Atlas() or AtlasCL() (Command Line version) functions:
Code: Select all
atlas = Atlas(w, h, po2, path, file, info, silent)
- w, h: starting width and height of image (1x1 by default)
- po2 - if true then create power of two sized image (true by default)
- path - path to images' folder (without recursion and format checking yet)
- file - name of output files (image and text file with coordinates), will be created in save directory of project
- info - if true then output some info to console
- silent - if true then exit after atlas creation
Code: Select all
atlas = Atlas(32, 32, true, "images", "atlas01", true, false) -- atlas01.png and atlas01.txt will be created
If you don't want to create output files but use it internally then:
- atlas.map contains the image itself
- atlas.uv - coords