标签:processing mousereleased processing mousepressed
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();
}
本文出自 “processing” 博客,转载请与作者联系!
标签:processing mousereleased processing mousepressed
原文地址:http://dazhou.blog.51cto.com/2604246/1549779