Monitors the frame rate (frames per second) in a
Scene and raises an event if the frame rate is
低于阈值。 后来,如果帧率恢复到所需的水平,则会单独提出一个事件.
To avoid creating multiple FrameRateMonitors for a single Scene, use FrameRateMonitor.fromScene
而不是明确构建一个实例.
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
optional
下列属性的对象 :
|
Members
The default frame rate monitoring settings. These settings are used when
FrameRateMonitor.fromScene
需要创建一个新的帧速率显示器,对于未传递到
FrameRateMonitor constructor.
Gets the most recently computed average frames-per-second over the last
samplingWindow.
如果框架速率没有计算出来,则该属性可能未定义 .
lowFrameRate : Event
获取检测到低帧速率时提升的事件 。 此函数将被传递
the
Scene instance as its first parameter and the average number of frames per second
作为第二个参数.
获取或设定可接受的性能所需的最小帧每秒
温暖期结束 如果在 NT 0 采样 Window NT 1 1 之后的 NT 2 暖气Period NT 3 期间,帧率平均值低于此,则
将提高 NT+0 lowFrameRate NT+1 事件,页面将重定向至 NT+2 重定向OnLowFrameRateUrl NT+3 ,如果有的话.
获取或设定可接受的性能所需的最小帧每秒
热身期。 如果在 NT 0 采样 Window NT 1 期间帧率平均值低于此,则
将提高 NT+0 lowFrameRate NT+1 事件,页面将重定向至 NT+2 重定向OnLowFrameRateUrl NT+3 ,如果有的话.
nominalFrameRate : Event
获取当帧率在低位后返回到正常水平时上升的事件.
The function will be passed the
Scene instance as its first parameter and the average
将采样窗口上的每秒帧数作为其第二个参数.
Gets or sets the length of time to wait at startup and each time the page becomes visible (i.e. when the user
switches back to the tab) before starting to measure performance, in seconds.
获取或设定用于计算平均帧率的滑动窗口长度,以秒计.
scene : Scene
Gets the
Scene instance for which to monitor performance.
获得或设定暖期长度,以秒计. 在暖和期,一个单独的
需要(通常较低)帧率.
Methods
static Cesium.FrameRateMonitor.fromScene(scene) → FrameRateMonitor
| Name | Type | Description |
|---|---|---|
scene |
Scene |
The scene for which to get the FrameRateMonitor. |
Returns:
The scene's
FrameRateMonitor.
取消此实例来自它正在听的所有事件 .
Once an object is destroyed, it should not be used; calling any function other than
isDestroyed will result in a DeveloperError exception. Therefore,
assign the return value (undefined) to the object as done in the example.
Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
如果此对象被销毁, 返回真实; 否则, 错误 .
If this object was destroyed, it should not be used; calling any function other than
If this object was destroyed, it should not be used; calling any function other than
isDestroyed will result in a DeveloperError exception.
Returns:
如果此天体被销毁, 则属真; 否则, 属假 .
Pauses monitoring of the frame rate. To resume monitoring,
FrameRateMonitor#unpause
必须每次调用此函数一次.
Resumes monitoring of the frame rate. If
FrameRateMonitor#pause was called
多个次数,此函数必须称为相同次数,才能
实际恢复监控.