Appearance
KBE3D / KBCore / Cesium / viewerPerformanceWatchdogMixin
函数: viewerPerformanceWatchdogMixin()
viewerPerformanceWatchdogMixin(
viewer:Viewer,options?: {lowFrameRateMessage?:string; }):void
A mixin which adds the PerformanceWatchdog widget to the Viewer widget. Rather than being called directly, this function is normally passed as a parameter to Viewer#extend, as shown in the example below.
参数
viewer
The viewer instance.
options?
An object with properties.
lowFrameRateMessage?
string
The message to display when a low frame rate is detected. The message is interpeted as HTML, so make sure it comes from a trusted source so that your application is not vulnerable to cross-site scripting attacks.
返回
void
示例
ts
const viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerPerformanceWatchdogMixin, {
lowFrameRateMessage : 'Why is this going so <em>slowly</em>?'
});