首页 > 文档 > frameRate帧速率
2017
07-03

frameRate帧速率

7.frameRate

Name名称):frameRate //程序的大致帧速率

Examples例子):

void setup() {

  frameRate(30);

}

void draw() {

                  line(0, 0, width, height);

                  println(frameRate);

}

 

Description描述):The system variable frameRate contains the approximate frame rate of a running sketch. The initial value is 10 fps and is updated with each frame. The value is averaged over several frames, and so will only be accurate after the draw function has run 5-10 times.

系统变量frameRate包含一个正在运行的草图的大致帧速率。初始值为10 fps,每帧更新一次。这个值在数帧上是平均的,所以在绘制函数运行5 – 10次后才会精确。

Related相关函数):frameRate()
frameCount

 



最后编辑:
作者:卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。