help on interactive drawing
in
Programming Questions
•
1 years ago
here is my code
im trying to make my shape increase in size when i press either mouse or key
void setup() {
//set the size of the window
size(800, 600);
background(255);
smooth();
}
void draw() {
rect(pmouseX,pmouseY,mouseX,mouseY,mouseX,mouseY);
strokeWeight(abs(pmouseX-pmouseY));;
}
void mousePressed(){
background(random(255),random(255),random(255));
stroke(random(255),random(255),random(255));
}
void mouseReleased(){
background(255);
}
void keyPressed(){
fill(random(255),random(255),random(255));
}
void keyReleased(){
fill(255);
}
im trying to make my shape increase in size when i press either mouse or key
void setup() {
//set the size of the window
size(800, 600);
background(255);
smooth();
}
void draw() {
rect(pmouseX,pmouseY,mouseX,mouseY,mouseX,mouseY);
strokeWeight(abs(pmouseX-pmouseY));;
}
void mousePressed(){
background(random(255),random(255),random(255));
stroke(random(255),random(255),random(255));
}
void mouseReleased(){
background(255);
}
void keyPressed(){
fill(random(255),random(255),random(255));
}
void keyReleased(){
fill(255);
}
1