码迷,mamicode.com
首页 > 其他好文 > 详细

processing mousePressed

时间:2014-09-07 18:38:46      阅读:266      评论:0      收藏:0      [点我收藏+]

标签: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 mousePressed

标签:processing mousereleased   processing mousepressed   

原文地址:http://dazhou.blog.51cto.com/2604246/1549779

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!