On this page

britzl/defold-metrics/metrics.mem

Calculate and display performance metrics in Defold games

  • GitHub: britzl/defold-metrics — pinned to 2fe3aed
    1. Pick a release from britzl/defold-metrics releases and add its Source code (zip) URL (or a packaged .zip asset, if the library ships one) to game.project under [project] dependencies, then Fetch Libraries in the Defold editor.
    2. Run bunx @defold-typescript/cli resolve to materialize its types.
    3. Import it under a namespace alias of your choice:
      import * as mem from "metrics.mem"

Functions

create(format?: string, position?: string, color?: string): Metrics

Parameters

  • format?: string
  • position?: string
  • color?: string

Returns

  • Metrics

Types

Metrics.mem: () => number

Metrics.update: () => void

Metrics.draw: () => void