atlas-packer

command module
v0.0.0-...-9211bd0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2014 License: MIT Imports: 10 Imported by: 0

README


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

Documentation

Overview

atlas-packer [options] spriteDir output

	--dimensions=1024x1024: Size of final atlas
	--space=1: Space inserted between sprites, in pixels
    --force=false: always rebuild atlas
    -v=false: Verbose output

outputs two files: <output>.png, and <output>.json

By default it will only build the atlas if necessary

spriteDir can only contain sprites, anything else will cause an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL