Tuesday, April 03, 2012
Drawtest_beta V2
int e = 50;
int g = 50;
int f = 0;
int a = 255;
int c = 0;
int b = 0;
int i = 0;
//declaring variables and initialising
void setup () {
size(1000,800);
a = 255;
b = 0;
c = 0;
fill (c,b,a);
stroke (a,b,c);
frameRate(50);
}
void draw() {
rect(989,0,10,800);
if(f == 1){
rect(mouseX,mouseY,e,g);}
}
void mousePressed() {if (mouseX > 990){
background (200,200,200);}
if (f == 0) {f = 1;} else {f = 0;}
}
void keyPressed() {
fill(c,b,a);
stroke(a,b,c);
if(i == 1) {i = 0;
a = 0;
b = 0;
c = 255;} else
{a = 255;
b = 0;
c = 0;
i = 1;}}
int g = 50;
int f = 0;
int a = 255;
int c = 0;
int b = 0;
int i = 0;
//declaring variables and initialising
void setup () {
size(1000,800);
a = 255;
b = 0;
c = 0;
fill (c,b,a);
stroke (a,b,c);
frameRate(50);
}
void draw() {
rect(989,0,10,800);
if(f == 1){
rect(mouseX,mouseY,e,g);}
}
void mousePressed() {if (mouseX > 990){
background (200,200,200);}
if (f == 0) {f = 1;} else {f = 0;}
}
void keyPressed() {
fill(c,b,a);
stroke(a,b,c);
if(i == 1) {i = 0;
a = 0;
b = 0;
c = 255;} else
{a = 255;
b = 0;
c = 0;
i = 1;}}
info
submitted by:
Lukasryghviews: 27
You can press the mouse to start or stop placing squares,key to alternate between red and blue. code borrowed from Drawtest_beta Click on the black box on the right to wipe screen. i recommend you have blocks ON when you click to avoid messing up.
This sketch has a parent
comments
loading...
Add a comment:
