format und variablen
This commit is contained in:
@@ -6,8 +6,5 @@ void draw() {
|
||||
background(255);
|
||||
|
||||
fill(mouseX*255/width);
|
||||
quad(50, 50,
|
||||
150, 50,
|
||||
150, 150,
|
||||
50, 150);
|
||||
quad(50, 50, 150, 50, 150, 150, 50, 150);
|
||||
}
|
||||
|
||||
@@ -4,10 +4,7 @@ void setup() {
|
||||
}
|
||||
void draw() {}
|
||||
void keyPressed() {
|
||||
quad(50,50,
|
||||
50,150,
|
||||
150,150,
|
||||
150,50);
|
||||
quad(50, 50, 50, 150, 150, 150, 150, 50);
|
||||
}
|
||||
void mousePressed() {
|
||||
background(255);
|
||||
|
||||
@@ -3,10 +3,7 @@ void setup() {
|
||||
background(255);
|
||||
// Viereck in der mitte
|
||||
fill(0);
|
||||
quad(50,50,
|
||||
150,50,
|
||||
150,150,
|
||||
50,150);
|
||||
quad(50, 50, 150, 50, 150, 150, 50, 150);
|
||||
}
|
||||
void draw() {
|
||||
// Radiergummi
|
||||
|
||||
@@ -6,6 +6,5 @@ void draw() {
|
||||
background(255);
|
||||
|
||||
rectMode(CORNERS);
|
||||
rect(50, 50,
|
||||
mouseX, mouseY);
|
||||
rect(50, 50, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,7 @@ void draw() {
|
||||
background(255);
|
||||
|
||||
// first line to center
|
||||
line(mouseX, mouseY,
|
||||
200/2, 200/2);
|
||||
line(mouseX, mouseY, 200/2, 200/2);
|
||||
// second line from center
|
||||
line(200/2, 200/2,
|
||||
100+100-mouseX, 100+100-mouseY);
|
||||
line(200/2, 200/2, 100+100-mouseX, 100+100-mouseY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user