function sketchProc(processing) {
var color1 = 0;
var abox = 125;
var bbox = 75;
var cbox = 30.0;
var value = "Created by Xana";
var dbox = 60;
processing.setup = function () {
processing.size(400, 400, processing.P3D);
processing.noFill();
processing.smooth();
}
processing.draw = function() {
if (processing.mousePressed == true) { processing.background(0); }
else{ processing.background(222); };
processing.translate(processing.width/2, processing.height/2, -(processing.width/2));
processing.rotateY(processing.map(processing.mouseX, 0, processing.width, -Math.PI, Math.PI));
processing.stroke(100);
processing.box(2*abox);
processing.textSize(25);
processing.text(value, abox, abox);
for(var i = -1;i<2;i+=2)
for(var j = -1;j<2;j+=2)
for(var k = -1; k<2; k+=2){
processing.translate(abox*i, abox*j, abox*k);
processing.box(abox/5);
processing.translate(-abox*i, -abox*j, -abox*k);
}
processing.rotateX(processing.map(processing.mouseY, 0, processing.height, -Math.PI, Math.PI));
processing.stroke(150);
processing.box(2*bbox);
for(var i = -1;i<2;i+=2)
for(var j = -1;j<2;j+=2)
for(var k = -1; k<2; k+=2){
processing.translate(bbox*i, bbox*j, bbox*k);
processing.box(bbox/4);
processing.translate(-bbox*i, -bbox*j, -bbox*k);
}
processing.rotateZ(processing.map(-processing.mouseX, 0, processing.width, -Math.PI, Math.PI));
processing.strokeWeight(5);
processing.fill(0);
processing.box(dbox);
processing.noFill();
processing.strokeWeight(1);
}
processing.mouseWheel = function(MouseEvent event) {
var e = event.getAmount();
println(e);
value += e;
println(value);
}
*/
}
var canvas = document.getElementById("canvas1");
var p = new Processing(canvas, sketchProc);