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

Commit

Permalink
add patch for processing instances
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltask committed Jun 18, 2012
1 parent 2d9b7b8 commit f1927e3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions lib/patch.js
@@ -0,0 +1,27 @@

/**
* Module dependencies.
*/

var path = require('path');

/**
* Apply patching for Processing instance.
*
* @param {Processing} p5
* @param {String} filePath
* @return {Processing}
*/

module.exports = function(p5, filePath) {
var loadImage = p5.loadImage;

p5.loadImage = function(file, type, callback) {
// TODO:
return loadImage(file, type, callback);
};

p5.canvas = p5.externals.canvas; // add short-hand.

return p5;
};

0 comments on commit f1927e3

Please sign in to comment.