xxxxxxxxxx
26
let a,b;
function setup() {
createCanvas(400, 400);
a = createGraphics(width,height,WEBGL);
b = createGraphics(width,height);
}
function draw() {
background(0,255,255);
a.push();
a.clear();
a.rotateX(frameCount/100);
a.box(100);
a.pop();
b.push();
b.clear();
b.rect(0,0,width/2,height/2);
b.pop();
image(a,0,0);
image(b,0,0);
}