New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

spritesmith

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spritesmith - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

2

CHANGELOG.md
# spritesmith changelog
0.11.0 - Optimize padded spritesheets to ignore trailing padding
0.10.0 - Adding `padding` parameter to `params`

@@ -3,0 +5,0 @@

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc