spritesmith
Advanced tools
Comparing version 0.10.0 to 0.11.0
# spritesmith changelog | ||
0.11.0 - Optimize padded spritesheets to ignore trailing padding | ||
0.10.0 - Adding `padding` parameter to `params` | ||
@@ -3,0 +5,0 @@ |
{ | ||
"name": "spritesmith", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "Utility that takes images and creates a spritesheet with JSON sprite data", | ||
@@ -5,0 +5,0 @@ "main": "src/smith.js", |
{ | ||
"width": 154, | ||
"height": 202 | ||
"width": 152, | ||
"height": 200 | ||
} |
@@ -108,10 +108,18 @@ var async = require('async'), | ||
// If there are items | ||
var itemsExist = packedObj.items.length; | ||
if (itemsExist) { | ||
// Remove the last item's padding | ||
width -= padding; | ||
height -= padding; | ||
} | ||
// Export the total width and height of the generated canvas | ||
retObj.properties = { | ||
width: width, | ||
height: height | ||
width: width, | ||
height: height | ||
}; | ||
// If there are items, generate the canvas | ||
if (packedObj.items.length) { | ||
if (itemsExist) { | ||
engine.createCanvas(width, height, cb); | ||
@@ -118,0 +126,0 @@ } else { |
Sorry, the diff of this file is not supported yet
534
757636