Skip to content

Klowner/spritesmith-texturepacker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SpriteSmith TexturePacker NPM Version NPM Downloads

TexturePacker export template for SpriteSmith!

About

This very tiny module makes exporting TexturePacker compatible JSON sprite sheets with grunt-spritesmith or gulp.spritesmith. Just pass it along via the cssTemplate parameter.

Example

Building a TexturePacker sprite sheet with gulp.

var spritesmith = require('gulp.spritesmith');

gulp.task('sprite', function () {
	return gulp.src('src/gfx/scubaman/*.png')
		.pipe(spritesmith({
			imgName: "scubaman.png",
			cssName: "scubaman.json",
			algorithm: 'binary-tree',
			cssTemplate: require('spritesmith-texturepacker') // <-- this right here
		})
		.pipe(gulp.dest('./dist/gfx/'));
});

Install

With npm:

npm install spritesmith-texturepacker

License

Copyright (c) 2014 Mark Riedesel Licensed under the MIT license.

About

Export TexturePacker compatible sprite sheets with spritesmith

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published