xxxxxxxxxx
28
function setup() {
createCanvas(400, 400, WEBGL);
tex = createGraphics(100, 100);
tex.background(255, 0, 0, 40);
strokeWeight(3);
}
function draw() {
background(220);
rotateX(-0.25);
rotateY(0.2);
// inner box
fill(100, 100, 220, 20);
stroke(0, 0, 100);
box(100);
// outer box
stroke(100, 0, 0);
fill(255, 0, 0, 32);
//texture(tex);
box(200);
// fill(100,100,220, 20);
// stroke(0,0, 100);
// box(100);
}