Last active
November 6, 2015 07:07
-
-
Save cupools/6186ee161d4958cf0b5c to your computer and use it in GitHub Desktop.
test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var spritesmith = require('spritesmith'), | |
fs = require('fs'); | |
// Generate our spritesheet | |
var sprites = [ | |
'0.png', | |
'4.png', | |
'2.png', | |
'1.png', | |
'5.png', | |
'3.png', | |
]; | |
console.time('t'); | |
spritesmith({ | |
src: sprites, | |
padding: 10, | |
}, function handleResult(err, result) { | |
fs.writeFileSync(new Date().getTime() + '.png', result.image, 'binary'); | |
console.timeEnd('t'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test", | |
"version": "1.0.0", | |
"description": "", | |
"main": "main.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"spritesmith": "^1.4.6" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment