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
- 本文固定链接: http://iprocessing.cn/2017/07/03/framerate帧速率/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表