Skip to content

Commit 3d43ece

Browse files
committed
more work on tests and shimming Canvas
1 parent d8216c6 commit 3d43ece

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ For help integrating, please open an issue.
7272

7373
Notes on development next steps:
7474

75+
* use `Marty.isBrowser`
76+
7577
### UI
7678

7779
* [ ] add createUserInterface() which is set up by default to draw on ImageBoardUI, but could be swapped for nothing, or an equiv. lib

dist/image-sequencer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184272,7 +184272,7 @@ module.exports = function GreenChannel(options) {
184272184272
function changePixel(r, g, b, a) {
184273184273
return [0, g, 0, a];
184274184274
}
184275-
return require('./PixelManipulation.js')(image, {
184275+
return require('./PixelManipulation.js')(_image, {
184276184276
output: options.output,
184277184277
changePixel: changePixel
184278184278
});
@@ -184471,7 +184471,8 @@ module.exports = function PixelManipulation(image, options) {
184471184471
getPixels(image.src, function(err, pixels) {
184472184472

184473184473
if(err) {
184474-
console.log("Bad image path")
184474+
console.log('image src',image.src)
184475+
console.log("getPixels: Bad image path")
184475184476
return
184476184477
}
184477184478

src/modules/GreenChannel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = function GreenChannel(options) {
1616
function changePixel(r, g, b, a) {
1717
return [0, g, 0, a];
1818
}
19-
return require('./PixelManipulation.js')(image, {
19+
return require('./PixelManipulation.js')(_image, {
2020
output: options.output,
2121
changePixel: changePixel
2222
});

src/modules/PixelManipulation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ module.exports = function PixelManipulation(image, options) {
1717
getPixels(image.src, function(err, pixels) {
1818

1919
if(err) {
20-
console.log("Bad image path")
20+
console.log('image src',image.src)
21+
console.log("getPixels: Bad image path")
2122
return
2223
}
2324

test/image-sequencer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ test('each core module has a draw() method which outputs an image via options.ou
4848
step.options.output = function moduleOutput(img) { images.push(image); }
4949
t.equal(step.draw(image));
5050
});
51-
t.equal(images.length, steps.length);
51+
t.equal(images.length, sequencer.steps.length);
5252
// and be sure they're all real images
5353
images.forEach(function forEachImage(img) {
5454
t.equal('Image', typeof img);

0 commit comments

Comments
 (0)