reverse engineering 3
2014-09-10 23:01:40 +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);
var r = 0;
processing.setup = function() {
processing.background(0);
processing.stroke(0);
processing.fill(255);
};
processing.draw = function() {
steps = height * 2;
r += 10;
processing.ellipse(halfWidth, r % steps, r % steps, r % steps);
};
processing.keyPressed = function() {
console.log(processing.key);
};
processing.mousePressed = function() {
};
processing.mouseReleased = function() {
};
}
// attach the sketch function to the canvas
var processingInstance = new Processing(document.getElementById('sketch'), drawerSketch);