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.
- Usage
- Prerequisites
- Format the project
- Automatically format the project on change
- Lint the project
- Automatically lint the project on change
- Build the vcpkg dependencies in the project
- Build the project
- Automatically build the project on change
- Test the project
- Automatically test the project on change
- Run the project
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.
- Windows 11 or Linux
- Visual Studio Code with plugins:
- Better TOML
- CodeLLDB
- EditorConfig for VS Code
- GLSL Lint
- Markdown All in One
- rust-analyzer
- Shader languages support for VS Code
- YAML
- Rust 1.61.0 and later
- rustfmt 1.4.38 and later
- clippy 0.1.60 and later
- cargo-watch 8.1.1 and later
- cargo-vcpkg 0.1.6 and later
cargo fmt
cargo watch -x fmt
cargo clippy --all-features
cargo watch -x "clippy --all-features"
cargo vcpkg build
cargo build
cargo watch -x build
cargo test
cargo watch -x test
cargo run