您的位置:首页 > 其它

processing mousePressed

2014-09-07 15:25 423 查看
float i=0;
boolean f=false;
float xx,yy,zz;
void setup() {
size(200, 200, P3D);
noFill();
smooth();
frameRate(25);
}

void draw() {

background(0);
xx= width/2;
yy=height/2;
zz=-(width/2);
translate(xx,yy,zz);
rotateX(map(i++, 0, height, -PI, PI));
rotateY(map(i++, 0, height, -PI, PI));
stroke(150);
box(75);
}

void mousePressed(){
loop();
}

void mouseReleased(){
noLoop();
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息