Skip to content

Commit

Permalink
more work on tests and shimming Canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren committed Mar 11, 2017
1 parent d8216c6 commit 3d43ece
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ For help integrating, please open an issue.

Notes on development next steps:

* use `Marty.isBrowser`

### UI

* [ ] add createUserInterface() which is set up by default to draw on ImageBoardUI, but could be swapped for nothing, or an equiv. lib
Expand Down
5 changes: 3 additions & 2 deletions dist/image-sequencer.js
Original file line number Diff line number Diff line change
Expand Up @@ -184272,7 +184272,7 @@ module.exports = function GreenChannel(options) {
function changePixel(r, g, b, a) {
return [0, g, 0, a];
}
return require('./PixelManipulation.js')(image, {
return require('./PixelManipulation.js')(_image, {
output: options.output,
changePixel: changePixel
});
Expand Down Expand Up @@ -184471,7 +184471,8 @@ module.exports = function PixelManipulation(image, options) {
getPixels(image.src, function(err, pixels) {

if(err) {
console.log("Bad image path")
console.log('image src',image.src)
console.log("getPixels: Bad image path")
return
}

Expand Down
2 changes: 1 addition & 1 deletion src/modules/GreenChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = function GreenChannel(options) {
function changePixel(r, g, b, a) {
return [0, g, 0, a];
}
return require('./PixelManipulation.js')(image, {
return require('./PixelManipulation.js')(_image, {
output: options.output,
changePixel: changePixel
});
Expand Down
3 changes: 2 additions & 1 deletion src/modules/PixelManipulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ module.exports = function PixelManipulation(image, options) {
getPixels(image.src, function(err, pixels) {

if(err) {
console.log("Bad image path")
console.log('image src',image.src)
console.log("getPixels: Bad image path")
return
}

Expand Down
2 changes: 1 addition & 1 deletion test/image-sequencer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test('each core module has a draw() method which outputs an image via options.ou
step.options.output = function moduleOutput(img) { images.push(image); }
t.equal(step.draw(image));
});
t.equal(images.length, steps.length);
t.equal(images.length, sequencer.steps.length);
// and be sure they're all real images
images.forEach(function forEachImage(img) {
t.equal('Image', typeof img);
Expand Down

0 comments on commit 3d43ece

Please sign in to comment.