level 1
void setup(){
size(440,440,OPENGL);
stroke(0);
fill(255,190);
}
void draw(){
background(0);
translate(width/2,height/2,0);
rotateX(mouseX/200.0);
rotateY(mouseY/100.0);
fill(200,150,50);
beginShape();
vertex(-110,-110,110);
vertex(70,-110,110);
vertex(110,-110,70);
vertex(110,-110,-110);
vertex(-110,-110,-110);
endShape();
beginShape();
vertex(-110,-110,110);
vertex(-110,110,110);
vertex(70,110,110);
vertex(70,-110,110);
endShape();
beginShape();
vertex(-110,110,110);
vertex(70,110,110);
vertex(110,110,70);
vertex(110,110,-110);
vertex(-110,110,-110);
endShape();
beginShape();
vertex(-110,-110,-110);
vertex(-110,110,-110);
vertex(110,110,-110);
vertex(110,-110,-110);
endShape();
beginShape();
vertex(-110,-110,110);
vertex(-110,110,110);
vertex(-110,110,-110);
vertex(-110,-110,-110);
endShape();
beginShape();
vertex(70,-110,110);
vertex(70,110,110);
vertex(110,110,70);
vertex(110,-110,70);
endShape();
beginShape();
vertex(110,110,-110);
vertex(110,-110,-110);
vertex(110,-110,70);
vertex(110,110,70);
endShape();
}
2015年08月13日 03点08分
