packer is a LÖVE lib that implements a bin packer algorithm to pack your textures in a texture atlas
packer = require("packer")(4096, 4096)
function love.load()
img1 = packer:newImage("path/to/image")
local image = love.graphics.newImage("path/to/image")
img2 = packer:add(image)
quad = img1:newQuad(x, y, w, h)
end
function love.draw()
packer:draw(img2, x, y)
packer:draw(img1, quad, x, y)
end
creates a new bin packer
changes the filter of the packer texture
packs a new image from the file
packs a new image from a previous loaded love2d image
draws the current state of the texture atlas
creates a new quad from the images coordinates in the texture atlas