Hey, can someone please tell me what I am doing wrong here:
int radius=0;
int length= 720;
float colorscheme1;
float colorscheme2;
float mouseX;
float mouseY;
boolean rectIsShrinking = true;
boolean circleIsShrinking = false;
void setup() {
size(1080, 720);
background(0,0,0);
rectMode(CENTER);
}
void draw() {
noStroke();
fill(red, green, blue);
rect(width/2, height/2, length, length);
if (rectIsShrinking) length–;
else length++;
if (length == 0 || length == 720) rectIsShrinking = !rectIsShrinking;
fill(red, green, blue);
ellipse(width/2, height/2, radius, radius);
if (circleIsShrinking) radius–;
else radius++;
if (radius == 0 || radius == 720) circleIsShrinking = !circleIsShrinking;
}
if(mouseX > 0 && mouseX < 1080 && mouseY > 0 && mouseY < 720) {
** colorscheme1 = (random(0), random(0), random(255)) &&**
** colorscheme2 = (random(255), random(0), random(0));**
** }**
** else{**
** colorscheme1 = (random(255), random(0), random(0)) &&**
** colorscheme2 = (random(0), random(0), random(255));**
}
}
–
basically processing can’t read this last part
the message on the console reads: expecting EOF, found ‘if’
thanks in advance!