Monitors the frame rate (frames per second) in a Scene and raises an event if the frame rate is
lower than a threshold. Later, if the frame rate returns to the required level, a separate event is raised.
To avoid creating multiple FrameRateMonitors for a single Scene, use FrameRateMonitor
instead of constructing an instance explicitly.
alias FrameRateMonitor
- The options object takes the following properties
- {Scene} options.scene The Scene instance for which to monitor performance.
- {Number} [options.samplingWindow=5.0] The length of the sliding window over which to compute the average frame rate, in seconds.
- {Number} [options.quietPeriod=2.0] 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.
- {Number} [options.warmupPeriod=5.0] The length of the warmup period, in seconds. During the warmup period, a separate
(usually lower) frame rate is required.
- {Number} [options.minimumFrameRateDuringWarmup=4] The minimum frames-per-second that are required for acceptable performance during
the warmup period. If the frame rate averages less than this during any samplingWindow during the warmupPeriod, the
lowFrameRate event will be raised and the page will redirect to the redirectOnLowFrameRateUrl, if any.
- {Number} [options.minimumFrameRateAfterWarmup=8] The minimum frames-per-second that are required for acceptable performance after
the end of the warmup period. If the frame rate averages less than this during any samplingWindow after the warmupPeriod, the
lowFrameRate event will be raised and the page will redirect to the redirectOnLowFrameRateUrl, if any.
Monitors the frame rate (frames per second) in a Scene and raises an event if the frame rate is lower than a threshold. Later, if the frame rate returns to the required level, a separate event is raised. To avoid creating multiple FrameRateMonitors for a single Scene, use FrameRateMonitor instead of constructing an instance explicitly.
alias FrameRateMonitor
- The options object takes the following properties - {Scene} options.scene The Scene instance for which to monitor performance. - {Number} [options.samplingWindow=5.0] The length of the sliding window over which to compute the average frame rate, in seconds. - {Number} [options.quietPeriod=2.0] 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. - {Number} [options.warmupPeriod=5.0] The length of the warmup period, in seconds. During the warmup period, a separate (usually lower) frame rate is required. - {Number} [options.minimumFrameRateDuringWarmup=4] The minimum frames-per-second that are required for acceptable performance during the warmup period. If the frame rate averages less than this during any samplingWindow during the warmupPeriod, the lowFrameRate event will be raised and the page will redirect to the redirectOnLowFrameRateUrl, if any. - {Number} [options.minimumFrameRateAfterWarmup=8] The minimum frames-per-second that are required for acceptable performance after the end of the warmup period. If the frame rate averages less than this during any samplingWindow after the warmupPeriod, the lowFrameRate event will be raised and the page will redirect to the redirectOnLowFrameRateUrl, if any.