Create a new MiniStats instance.
The application.
Optional
options: { Options for the MiniStats instance.
CPU graph options.
GPU graph options.
Sizes of area to render individual graphs in and spacing between individual graphs.
Index into sizes array for initial setting.
Array of options to render additional graphs based on stats collected into AppBase#stats.
Refresh rate of text stats in ms.
// create a new MiniStats instance using default options
const miniStats = new pc.MiniStats(app);
Get/set the enabled state of the MiniStats overlay.
Private
initPrivate
Create the graphs requested by the user and add them to the MiniStats instance.
The application.
The graphics device.
Options for the MiniStats instance.
Private
losePrivate
postPrivate
renderPrivate
resizePrivate
updateStatic
getReturns the default options for MiniStats. The default options configure the overlay to show the following graphs:
The default options for MiniStats.
const options = pc.MiniStats.getDefaultOptions();
MiniStats is a small graphical overlay that displays realtime performance metrics. By default, it shows CPU and GPU utilization, frame timings and draw call count. It can also be configured to display additional graphs based on data collected into AppBase#stats.