Giter Club home page Giter Club logo

atlas-packer's Introduction

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

MIT license

atlas-packer's People

Contributors

jjhesk avatar zan-xhipe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.