Engine API Reference - v2.23.0-beta.4
    Preparing search index...

    Class MiniStats

    MiniStats is a small graphical overlay that displays realtime performance metrics. By default, it shows CPU and GPU durations, frame intervals, draw call count and estimated GPU resource memory. It can also display additional counters from AppBase#stats.

    The default CPU timings, including render time, draw call count and memory estimates are available in all builds. GPU timing requires device support and is enabled when MiniStats creates its GPU timer. Some additional counters, such as AppStats#primitiveCount, require a debug or profiler build. See AppStats for measurement scope and availability.

    Index
    • Create a new MiniStats instance.

      Parameters

      Returns MiniStats

      const miniStats = new MiniStats(app);
      
    • get enabled(): boolean

      Returns boolean

    • set enabled(value: boolean): void

      Whether the overlay and its counter sampling are enabled. Defaults to true.

      Parameters

      • value: boolean

      Returns void

    • Destroy the MiniStats instance and release its event listeners, textures and mesh.

      Returns void

      miniStats.destroy();
      
    • Returns options for three sizes: compact core counters, grouped averages, and grouped averages and peaks with graph history. Draw calls and frame time appear first, followed by ungrouped counters in their configured order, then CPU, GPU and VRAM.

      Parameters

      • OptionalextraStats: string[] = []

        Presets to include: 'gsplats' or 'gsplatsCopy'.

      Returns MiniStatsOptions

      The default options for MiniStats.

      const options = MiniStats.getDefaultOptions(['gsplats']);
      options.sizes[2].width = 280;
      const miniStats = new MiniStats(app, options);