IFD:All Hail The Pixels/designs: Difference between revisions

From Medien Wiki
Line 742: Line 742:
}
}
popMatrix();
popMatrix();
}
==Christoph==
void setup () {
size(displayWidth, displayHeight);
}
int x=1;
void draw () {
background(20,20,10);
frameRate(10);
pushMatrix();
translate(250,250);
for (int i=20; i<width; i+=1){
rectMode(CENTER);
rotate(x+=1);
rect(i,0,10,10);
fill(255,20,0);
stroke(0);
}
for (int i=10; i<width; i+=1){
rectMode(CENTER);
rotate(mouseY * 0.0001);
rect(i,i,50,50);
fill(255,120,0);
stroke(0);
}
popMatrix();
}
boolean sketchFullScreen() {
  return true;
}
Option2
void setup () {
size(displayWidth, displayHeight,P3D);
}
int x=10;
void draw () {
background(20,20,10);
frameRate(20);
pushMatrix();
translate(250,250);
for (int i=20; i<width; i+=1){
rectMode(CENTER);
rotate(x+=1);
rect(i,0,10,10);
fill(255,20,0);
stroke(0);
}
for (int i=1; i<width; i+=1){
rectMode(CENTER);
rotateY(mouseY * 0.0001);
rect(i,i,50,50);
fill(255,120,0);
stroke(0);
}
popMatrix();
}
boolean sketchFullScreen() {
  return true;
}
}