Crates.io | corral |
lib.rs | corral |
version | 0.1.5 |
source | src |
created_at | 2022-09-27 06:27:42.316341 |
updated_at | 2023-02-13 00:49:35.740938 |
description | A simple sprite sheet packer |
homepage | https://github.com/danielclarke/corral |
repository | https://github.com/danielclarke/corral |
max_upload_size | |
id | 674752 |
size | 58,577 |
Corral creates a sprite sheet and data from a folder of images. Corral supports generating json or lua data.
corral input/to/assets output.png
json excerpt
[{"name":"img_file_name_1","x": 2,"y": 2,"width": 256,"height": 64}...]
corral test/squares-different-sizes Squares.png --data-fmt=lua
lua exceprt
local Squares = {
RECTANGLE_1 = {
x = 2,
y = 2,
width = 64,
height = 64,
},
RECTANGLE_3 = {
x = 68,
y = 2,
width = 32,
height = 32,
},
RECTANGLE_2 = {
x = 2,
y = 68,
width = 16,
height = 16,
},
RECTANGLE_4 = {
x = 2,
y = 86,
width = 8,
height = 8,
}
}
return Squares