Skip to content

A CLI tool used to generate texture atlases for graphics applications such as GUI, video games and so on to improve performance of these applications.

License

Notifications You must be signed in to change notification settings

ii887522/texture-packer

Repository files navigation

texture-packer

Semantic Versioning 2.0.0 Linux Windows made-with-rust MIT license

Sample texture atlas

A CLI tool used to generate texture atlases for graphics applications such as GUI, video games and so on to improve performance of these applications.

Table of contents

Usage

texture-packer <input-dir-path> <output-dir-path>

input-dir-path is an input directory path where the directory is located optionally contains a list of images that will become parts of a texture atlas.

The input directory given also optionally contains a blur.toml file that contains a variable called img_file_names which is an array of strings that selects the images in the input directory to be used to generate their blur variants. Each entry in img_file_names array is a relative file path to the image.

blur.toml also optionally contains a variable called rects which is a TOML table. Each entry in the TOML table has a key of type string that denotes the name of the white rectangle. No nested keys are allowed in the rects TOML table. Each entry in the TOML table also have a value comprises variables w and h that are width and height of the rectangle respectively. Both w and h variables must be integers and greater than 0.

output-dir-path is an output directory path where the directory is located contains a generated texture atlas file and a texture region reference file in TOML format. Each texture region reference inside the TOML file points to a small area of the texture atlas. That small area is actually an image (rotated or not) which comes from the input directory.

Prerequisites

Format the project

cargo fmt

Automatically format the project on change

cargo watch -x fmt

Lint the project

cargo clippy --all-features

Automatically lint the project on change

cargo watch -x "clippy --all-features"

Build vcpkg dependencies in the project

cargo vcpkg build

Build the project

cargo build

Automatically build the project on change

cargo watch -x build

Test the project

cargo test

Automatically test the project on change

cargo watch -x test

Run the project

cargo run

About

A CLI tool used to generate texture atlases for graphics applications such as GUI, video games and so on to improve performance of these applications.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks