xxxxxxxxxx
47
let R = 70;
let G = 0;
let B = 70;
function setup() {
createCanvas(windowWidth, windowHeight, WEBGL);
background(100);
}
function draw() {
function dobleClicked (){
if (noStroke === true){
noStroke = false;
}else {
noStroke = true;
}
}
fill (R, G, B);
rotateX(frameCount * 0.01);
rotateY(frameCount * 0.01);
box(100);
if (mouseIsPressed === true){
fill (R = R+1 , G = G, B = B);
}
if(keyIsPressed === true){
noStroke
fill (R = R-1 , G = G , B = B);
}
rotateX(frameCount * 0.0001);
rotateY(frameCount * 0.001);
box(mouseX, mouseY, 20);
rotateX(frameCount * 0.0001);
rotateY(frameCount * 0.001);
box(mouseX, mouseY, 20);
box(100);
}