Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Class PerformanceMonitor

    Compact, theme-matched performance readout (the vendored replacement for stats.js). Shows one metric at a time and cycles FPS → frame time (ms) → a scrolling graph on click, driven by the animation loop's frame-start / frame-end events (subscribed to only while visible). Preserves the original #luxar-stats element id and toggle/show/hide/dispose surface so the P-key InputHandler and control-rail gauge drive it unchanged.

    Index
    el: HTMLDivElement
    numEl: HTMLSpanElement
    unitEl: HTMLSpanElement
    canvas: HTMLCanvasElement
    ctx2d: CanvasRenderingContext2D | null
    isVisible: boolean = false
    mode: PerfMode = 'fps'
    frameStartUnsubscribe: Unsubscribe | null = null
    frameEndUnsubscribe: Unsubscribe | null = null
    frameT0: number = 0
    msEma: number = 0
    frameCount: number = 0
    windowStart: number = 0
    fps: number = 0
    lastRender: number = 0
    fpsHistory: number[] = []
    keepAlive?: PerfKeepAlive
    • get element(): HTMLElement

      The widget element — the caller mounts it (e.g. docked in the control rail).

      Returns HTMLElement