flowchart 1
2014-09-03 19:15:51 +0000
var width = window.innerWidth;
var height = $('body').height() - 3;
var halfWidth = width / 2;
var halfHeight = height / 2;
function drawerSketch(processing) {
// set size
processing.size(width, height);
processing.setup = function() {
processing.stroke(255);
};
processing.keyPressed = function() {
processing.background(0,255,255);
};
processing.mousePressed = function() {
processing.stroke(0);
console.log('mouse pressed!');
};
processing.mouseReleased = function() {
processing.stroke(255);
console.log('mouse released!');
};
processing.draw = function() {
processing.point(processing.mouseX, processing.mouseY);
};
}
// attach the sketch function to the canvas
var processingInstance = new Processing(document.getElementById('sketch'), drawerSketch);