1.0.4 • Published 10 years ago

spritesmith-texturepacker-array v1.0.4

Weekly downloads
22
License
-
Repository
github
Last release
10 years ago

SpriteSmith TexturePacker (JSON Array) NPM Version NPM Downloads

TexturePacker export template for SpriteSmith - using the array format preferred by Phaser.io

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-array') // <-- this right here
		})
		.pipe(gulp.dest('./dist/gfx/'));
});

Install

With npm:

npm install spritesmith-texturepacker-array

License

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

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago