Skip to content
This repository was archived by the owner on Mar 12, 2018. It is now read-only.

Commit f1927e3

Browse files
committed
add patch for processing instances
1 parent 2d9b7b8 commit f1927e3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

lib/patch.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
/**
3+
* Module dependencies.
4+
*/
5+
6+
var path = require('path');
7+
8+
/**
9+
* Apply patching for Processing instance.
10+
*
11+
* @param {Processing} p5
12+
* @param {String} filePath
13+
* @return {Processing}
14+
*/
15+
16+
module.exports = function(p5, filePath) {
17+
var loadImage = p5.loadImage;
18+
19+
p5.loadImage = function(file, type, callback) {
20+
// TODO:
21+
return loadImage(file, type, callback);
22+
};
23+
24+
p5.canvas = p5.externals.canvas; // add short-hand.
25+
26+
return p5;
27+
};

0 commit comments

Comments
 (0)