xxxxxxxxxx
49
function setup() {
createCanvas(700, 700, WEBGL);
background(252, 246, 237);
stroke(50);
fill(255, 255, 255);
smooth();
}
function draw() {
let s1 = random(10, 100);
let s2 = random(100, 250);
let s3 = random(50, 200);
rotateY(150);
line(-1000, 10, 500, 100);
translate(50, -30, 0);
box(s1, s2, s3);
translate(0, 0, 90);
box(s3, s1, s2);
translate(-60, 0);
box(s1, s2, s3);
translate(0, 100);
box(s1, s3, s2);
translate(50, 0);
box(s2, s3, s2);
translate(-90, 0);
box(s2, s1, s3);
noLoop();
}
function keyPressed() {
if (keyCode === ENTER) {
loop();
} else if (keyCode === BACKSPACE) {
background(252, 246, 237);
loop();
}
}