Engine API Reference
    Preparing search index...

    Class MiniStats

    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.

    Index

    Constructors

    Accessors

    Methods

    Constructors

    • Create a new MiniStats instance.

      Parameters

      Returns MiniStats

      // create a new MiniStats instance using default options
      const miniStats = new pc.MiniStats(app);

    Accessors

    • get enabled(): boolean

      Gets the enabled state of the MiniStats overlay.

      Returns boolean

    • set enabled(value: boolean): void

      Sets the enabled state of the MiniStats overlay.

      Parameters

      • value: boolean

      Returns void

    Methods

    • Destroy the MiniStats instance.

      Returns void

      miniStats.destroy();
      
    • Returns the default options for MiniStats. The default options configure the overlay to show the following graphs:

      • CPU utilization
      • GPU utilization
      • Overall frame time
      • Draw call count

      Returns any

      The default options for MiniStats.

      const options = pc.MiniStats.getDefaultOptions();