Skip to content

zan-xhipe/atlas-packer

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

A command line utility to pack a collections of sprites into a larger image.

Usage

atlas-packer [options] spriteDirectory output

–dimensions 1024x1024 Size of the final atlas

–space 1 space between sprites

–force false always rebuild the atlas

-v Verbose output

It will produce two files output.png and output.json

By Default it will only rebuild the atlas if its necessary. This is determined by if the sprite directory has been modified since the last atlas modification.

Restrictions

All sprites must be in the same directory, everything in that directory must be a sprite. This is to help promote good organisation.

At the moment it only outputs the atlas texture as a png, and the atlas data as json.

Motivation

I wanted an small open source command line texture packer as part of the build process for my games. I dislike storing the entire sprite atlas in git as if you change one sprite you end up with two binary files changed. I was also tired of manually updating the atlas every time I changed a sprite. When I decided to learn go I thought that this would be a nice project to start with.

Future

Maybe:

  • More export types
  • Sprite rotation
  • Automatic atlas size

About

A simple command line texture packer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages