All Projects → Klowner → spritesmith-texturepacker

Klowner / spritesmith-texturepacker

Licence: MIT license
Export TexturePacker compatible sprite sheets with spritesmith

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to spritesmith-texturepacker

image-sprite-webpack-plugin
A webpack plugin that generates spritesheets from your stylesheets.
Stars: ✭ 27 (+145.45%)
Mutual labels:  spritesmith

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].