Texture atlas generation library for LÖVE

coz 496209962d Initial commit 1 year ago
out 496209962d Initial commit 1 year ago
.gitattributes e124510587 Added git attributes 1 year ago
LICENSE 496209962d Initial commit 1 year ago
README.md 496209962d Initial commit 1 year ago
atlas.lua 496209962d Initial commit 1 year ago
conf.lua 496209962d Initial commit 1 year ago
main.lua 496209962d Initial commit 1 year ago

README.md

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:

    atlas = Atlas(w, h, po2, path, file, info, silent)

where:

  • 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

example:

atlas = Atlas(32, 32, true, "images", "atlas01", true, false) -- atlas01.png and atlas01.txt will be created

If you omit path to images, then you should use atlas.build(path) function later. You can also use atlas.out(filename, format) function to save atlas.

If you don't want to create output files but use it internally then:

  • atlas.map contains the image itself
  • atlas.uv - coords