设置每秒绘制的帧数。
调用 frameRate() 时,传入一个数字参数,例如: frameRate(30), 表示每秒绘制 30 帧(FPS)。目标帧率是否能达到,由绘图处理需求决定。大多数计算机默认帧率是 60 FPS。24 FPS及以上的帧率就足够实现流畅的动画。
调用 frameRate() 返回当前帧率的近似值。
示例
语法
frameRate(fps)
frameRate()
参数
fps
数字:
每秒绘制的帧数
This page is generated from the comments in src/core/environment.js . Please feel free to edit it and submit a pull request!