spritesmith
Advanced tools
Comparing version 3.1.1 to 3.2.0
# spritesmith changelog | ||
3.2.0 - Removed support for Node.js < 4 | ||
3.1.1 - Added support for transpiled ES6 modules | ||
@@ -3,0 +5,0 @@ |
{ | ||
"name": "spritesmith", | ||
"description": "Utility that takes images and creates a spritesheet with JSON sprite data", | ||
"version": "3.1.1", | ||
"version": "3.2.0", | ||
"homepage": "https://github.com/Ensighten/spritesmith", | ||
@@ -24,3 +24,3 @@ "author": { | ||
"engines": { | ||
"node": ">= 0.10.0" | ||
"node": ">= 4.0.0" | ||
}, | ||
@@ -50,2 +50,3 @@ "scripts": { | ||
"phantomjssmith": "~1.0.0", | ||
"pixelmatch": "~4.0.2", | ||
"twolfson-style": "~1.6.0", | ||
@@ -52,0 +53,0 @@ "vinyl": "~1.1.0" |
@@ -6,2 +6,3 @@ // Load in modules | ||
var getPixels = require('get-pixels'); | ||
var pixelmatch = require('pixelmatch'); | ||
var Vinyl = require('vinyl'); | ||
@@ -102,3 +103,3 @@ var Spritesmith = require('../src/smith.js'); | ||
// Assert the actual image is the same expected | ||
// Assert the actual image is close to the expected image | ||
// DEV: We are using pngjs for decoding/encoding in the library but this is testing one more cycle | ||
@@ -109,3 +110,7 @@ getPixels(actualImageBuff, 'image/png', function handleActualPixels (err, actualImage) { | ||
if (err) { return done(err); } | ||
assert.deepEqual(actualImage, expectedImage, 'Actual image does not match expected image'); | ||
assert.deepEqual(actualImage.shape, expectedImage.shape, | ||
'Actual image shape does not match expected image shape'); | ||
var numDiffPixels = pixelmatch(actualImage.data, expectedImage.data, null, | ||
actualImage.shape[0], actualImage.shape[1]); | ||
assert(numDiffPixels < 10, 'Expected at most 10 pixels to be different but received ' + numDiffPixels); | ||
done(); | ||
@@ -112,0 +117,0 @@ }); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91051
613
12