oneliner
As you move the cursor across the screen, the line increases suddenly in size, flooding the screen.
float x;
void setup () {
size (400, 400);
smooth ();
x = width/2;
noCursor ();
}
void draw () {
background (200);
strokeWeight (1);
stroke (255);
if (mouseX > x) {
x += 2 ;
}
if (mouseX < x) {
x -= 2;
}
line (x, 200, 20, 200);
line (mouseX, mouseY, mouseX, mouseY );
line (mouseX, mouseY, mouseX, mouseY );
if (mouseX > width/2) {
strokeWeight (650);
}
else {
strokeWeight (1);
}
if (mouseX > width/2) {
stroke (100);
strokeWeight (650);
if (mouseX > x) {
x += 2 ;
}
if (mouseX < x) {
x -= 2;
line (x, 200, 20, 200);
line (mouseX, mouseY, mouseX, mouseY);
}
}
else {
stroke (255);
strokeWeight (650);
}
}