Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    Index
    • Parameters

      • fallback: number

        Cap assumed until the display proves a higher rate.

      • ceiling: number = 0

        Upper bound on the REPORTED cap (0 = none). The learned mark itself is never clamped — throttle detection still compares against what the display actually demonstrated — only what the thresholds derive from is. A 120 Hz ProMotion tablet with a 60 Hz ceiling scales down below 45 fps rather than below 90.

      Returns RefreshRateEstimator

    mark: number = 0
    recent: number[] = []
    lowUniformSince: number | null = null
    throttled: boolean = false
    throttlePlateau: number | null = null
    provenSinceContentChange: boolean = false
    distressSignal: boolean = false
    fallback: number

    Cap assumed until the display proves a higher rate.

    ceiling: number = 0

    Upper bound on the REPORTED cap (0 = none). The learned mark itself is never clamped — throttle detection still compares against what the display actually demonstrated — only what the thresholds derive from is. A 120 Hz ProMotion tablet with a 60 Hz ceiling scales down below 45 fps rather than below 90.

    • Feed one window-FPS sample (callers should only feed full-span, unsuppressed windows so partial data doesn't pollute the mark).

      Parameters

      • fps: number
      • timestamp: number

      Returns void

    • One-shot sub-throttle distress verdict: true when FPS has stayed below MIN_THROTTLE_PLATEAU for DOWNSHIFT_AFTER_MS — a regime no real display throttle can produce, so it is heavy content by construction. Consuming clears the latch; the detector re-arms and re-fires after another sustained period if the distress persists. The intended response is a DPR-ceiling demotion, not a cap change (the cap deliberately stays fallback-floored so scale-down stays armed).

      RE-VALIDATED AT CONSUMPTION: a verdict can be latched on a tick the manager doesn't consume (probe in flight, load suppression) and go stale if the workload lightens before the next clean tick. The verdict is therefore only honored while the CURRENT sample window still shows distress; otherwise it is dropped (a genuinely distressed scene re-earns it within DOWNSHIFT_AFTER_MS).

      Returns boolean

    • The frame loop was interrupted (idle pause, tab hide, a long stall's gap-reset): the sample stream broke, so the SESSION-grade transients are stale — the recent window (pre-gap frames), the uniform-low plateau clock (which would otherwise count unobserved wall-clock dead time toward the "sustained" requirement and let a single janky post-resume window fire an immediate verdict), and an unconsumed distress latch. LEARNED state survives: the high-water mark, a latched throttle verdict, and the proven-rate flag all describe the display/content, not the interrupted sample stream.

      Returns void

    • Scene content genuinely changed (dataset load, layer change, LOD swap): ALL content-relative throttle state resets — the proof that would arm a new downshift AND an already-latched throttle verdict. The verdict was earned against the OLD content's frame stream; carrying it forward would keep the cap collapsed on the reseeded plateau and invert the thresholds for the NEW content (scale-up armed on a heavy scene) with no reachable exit sample. If the display is STILL genuinely throttled, the new content cannot re-prove ≥80% of fallback, so no new downshift fires and the futile scale-down probes are contained by the rejection backoff — the same accepted corner as a session throttled from its first frame. Only the monotonic mark survives: it is used purely as an upper bound via max(mark, fallback), which stays correct and avoids threshold flapping on every LOD swap.

      Returns void