Skip to content

Sprite/Texture Atlas packing tool written in Rust

License

Notifications You must be signed in to change notification settings

vstepchik/sprack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sprack

A tool for packing sprites/lightmaps/whatever textures into atlases.

Written while learning Rust. Inspired by TeamHypersomnia/rectpack2D and @blackpawn's Packing Lightmaps text.

Suggestions are welcome!

TODO
  • Base algorithm
  • Sprite flipping support (attempt fit rotated by 90°)
  • Heuristics
    • Sort by area
    • Sort by perimeter
    • Sort by max side
    • Sort by width
    • Sort by height
    • Sort by squareness × area
    • Sort by squareness × perimeter
  • Demo rectangles packing, writing output images
  • Picking best result
  • Atlas compacting
  • Atlas trimming
  • Writing sprites
  • Split code into two crates (bin and lib)
  • Make lib crate extensible with custom heuristics
  • Command-line argument processing
  • Add metadata output
    • JSON
    • YAML
    • RON?
    • Protobuf?
  • Use logger instead of println!
  • Add manual and more details to README.md
  • Multi-threading
  • Tests?
  • Benchmarks?
  • Add optional border and padding?
  • Refactor until feel pride

About

Sprite/Texture Atlas packing tool written in Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages