Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    Index
    floor: number
    floorExpiresAt: number = 0
    floorBackoffLevel: number = 0
    lastRejectedProbeDPR: number | null = null
    ceilingDemoted: boolean = false
    ceilingExpiresAt: number = 0
    ceilingBackoffLevel: number = 0
    punishedAscentCount: number = 0
    lastAscent: { dpr: number; timestamp: number } | null = null
    • get dprCeiling(): number | null

      The current operating ceiling, or null when not demoted (the caller then uses the live native DPR). By design the only demoted value is exactly 1.0 — a principled Schelling point (CSS-pixel resolution, what every 1x display renders), not a hunted estimate.

      Returns number | null

    • Whether a proposed scale-down target is blocked by the floor.

      The to-or-below early-return (rather than clamping to the floor) is load-bearing: after a rejection the next proposed step lands at exactly the floored value, and clamping would re-fire the same failing probe every evaluation tick — the TTL would never get a chance to expire.

      Parameters

      • proposedDPR: number

      Returns boolean

    • Record a rejected probe: tighten the floor to the probed DPR.

      A rejection at (approximately) the same DPR as the previous one is the same experiment failing again — escalate the TTL. A rejection at a different DPR is new evidence and restarts the ladder.

      Parameters

      • probedDPR: number
      • timestamp: number

      Returns number

      the TTL applied, ms (for logging)

    • Let an expired floor decay back to minDPR. Returns true when the floor actually lifted (callers log on that edge). The escalation streak SURVIVES expiry — that memory is what makes the next identical rejection back off harder.

      Parameters

      • timestamp: number

      Returns boolean

    • Record a scale-up that moved the DPR above 1.0. If FPS collapses shortly after, recordSlowSample() counts it as a punished ascent.

      A previous ascent still on record here has, by construction, outlived its punishment window without a slow sample — evidence the scene CAN sustain above-1.0, so the punishment tally is stale and resets. Without this the count is a lifetime tally and two isolated hiccups minutes apart would demote a perfectly HiDPI-capable scene.

      Parameters

      • dpr: number
      • timestamp: number

      Returns void

    • Record a below-down-threshold FPS sample (callers must NOT feed load-suppressed samples — load jank is not the ascent's fault). If it lands within the punishment window of a recorded ascent, the ascent is punished; at the configured threshold the ceiling demotes to 1.0 with a (backed-off) TTL.

      Parameters

      • timestamp: number

      Returns boolean

      true when the demotion happened on THIS call — the caller then clamps its operating DPR to 1.0 in one step.

    • Demote the ceiling to 1.0 directly on outside evidence (sustained sub-throttle distress — FPS too low to be any real display throttle), bypassing the punished-ascent tally: the scene has already proven it can't afford the above-1.0 luxury without any ascent experiment. Same TTL/backoff ladder as an earned demotion — a scene that keeps re-earning it holds it longer each time.

      Parameters

      • timestamp: number

      Returns number

      the TTL applied, ms (for logging)

    • Lift an expired ceiling demotion. The backoff level SURVIVES — a scene that keeps re-earning the demotion holds it longer each time. Returns true when the ceiling actually lifted.

      Parameters

      • timestamp: number

      Returns boolean

    • Scene content changed: pull the floor's and ceiling's expiry forward to at most recheckMs from now and reset the escalation streaks — the old evidence described different content.

      Parameters

      • timestamp: number
      • recheckMs: number

      Returns void