fastpack-0.5.0 is not a library.
FastPack
Texture atlas packer written in Rust 2024. Replaces TexturePacker with a native GUI as the primary interface, plus a full-featured CLI and TUI.
Features
- Packing algorithms — MaxRects (5 heuristics), Grid, Basic strip
- Trim modes — None, Trim, Crop, CropKeepPos, Polygon (convex hull)
- Export formats — JSON Hash, JSON Array, Phaser 3, PixiJS
- Compression — PNG via oxipng (lossless), JPEG via mozjpeg, WebP, lossy PNG via imagequant
- Alias detection — content-hash dedup with pixel verification
- Sprite features — extrusion, rotation, nine-patch metadata, pivot points
- Multi-resolution — scale variants with per-variant suffix and resampling filter
- Watch mode — repack on file change
- Project files —
.fpsheetTOML format - Multipack — overflow sprites across multiple atlas sheets
Install
Download a prebuilt binary from the releases page.
Or install from crates.io:
Usage
# Open the GUI (default when no subcommand is given)
# Pack a directory of sprites
# Pack with options
# Load settings from a project file
# Watch for changes and repack automatically
# Split an atlas back into individual sprites
# Generate a default project file
# Open the TUI
Project File
Settings live in a .fpsheet TOML file:
[]
= "1"
[]
= "atlas"
= "output/"
= "png"
= "rgba8888"
= "json_hash"
= 95
[]
= 4096
= 4096
= "pot"
= false
= true
= "good"
= 2
= 2
[]
= "trim"
= 1
= 0
= true
[]
= "max_rects"
= "best_short_side_fit"
[[]]
= 1.0
= "@1x"
= "smooth"
[[]]
= "sprites/"
= "**/*.png"
Export Formats
data_format in the project file or --data-format on the CLI accepts:
json_hash— TexturePacker-compatible JSON with frames as an object keyed by sprite ID. Default.json_array— Same structure but frames as an array, each entry with afilenamefield.phaser3— Single JSON file with atexturesarray. Compatible withscene.load.multiatlas().pixijs— JSON Hash format; identical output tojson_hash, distinguished by format ID.
License
Licensed under MIT.