怎么让一个圆以每秒10次的频率闪烁?
processing吧
全部回复
仅看楼主
level 1
陈宇830
楼主
int radius = 40;
float x = 200;
void setup(){
size(800,600);
smooth();
}
void draw(){
frameRate(10);
background(0);
strokeWeight(0);
fill(0,0,255);
ellipse(x,x,100,100);
}
这是我写的一段代码,但是没有效果
framerate这个函数只对运动的图像有效,不知道该怎么办了
2015年10月05日 11点10分
1
level 6
Kunard的故事
frameRate();
2015年10月05日 14点10分
2
level 11
XD_Ares
闪烁可以用两种颜色变换实现啊
2015年10月06日 06点10分
3
XD_Ares
@陈宇830
void setup(){ size(500,500); } void draw(){ if(frameCount%2==0){ fill(0); }else{ fill(255); } ellipse(250,250,350,350); }
2015年10月06日 16点10分
level 6
Kunard的故事
白色和黑色
2015年10月12日 04点10分
4
level 6
ºoº0ºoº
每秒十次不是要20fps吗?。。
我记得有一个记录已完成的帧数的变量,取余即可
2015年10月21日 03点10分
5
1