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

    Scale-up hysteresis tracker — DPR only scales up after FPS has stayed above the up-threshold for a sustained period, so a momentary breeze of fast frames doesn't trigger a quality/perf oscillation.

    Adds a mid-band GRACE over the naive "any non-high sample resets the timer" rule: on a 60Hz display two dropped frames in one window read as 58.0 FPS (mid-band), and under the naive rule a machine dropping a couple of frames every few seconds could never accumulate the full hysteresis period — quality recovery stalled indefinitely. Up to graceSamples consecutive mid-band samples are tolerated inside a streak; only a longer wobble (or any below-down-threshold sample) resets it.

    Pure and timestamp-driven; no clocks, no window, no config imports.

    Index
    streakStart: number | null = null
    midbandStrikes: number = 0
    config: { hysteresisMs: number; graceSamples: number }

    Type Declaration

    • hysteresisMs: number

      Sustained high-FPS time required before firing, ms.

    • graceSamples: number

      Consecutive mid-band samples tolerated inside a streak.

    • Record a sample above the up-threshold. Returns true when the streak has lasted the full hysteresis period — the caller then scales up and calls clear().

      Parameters

      • timestamp: number

      Returns boolean

    • Record an in-between sample (neither high enough to advance nor low enough to scale down). Tolerated graceSamples times in a row; beyond that the streak resets.

      Returns void