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

    Class ResolutionIndicator

    Manages the resolution indicator UI

    Index
    element: HTMLDivElement | null = null
    isVisible: boolean = false
    hideTimeout: Timeout | null = null
    autoHideTimeout: Timeout | null = null
    hasShownForCurrentMode: boolean = false
    targetFPS: number = 60
    AUTO_HIDE_DELAY: 4000

    Duration to show the indicator before auto-hiding (ms)

    • Set the target FPS for display purposes

      Parameters

      • fps: number

        Target FPS from config

      Returns void

    • Show the indicator with the current resolution scale

      Only shows once per reduced resolution mode activation. After showing for 4 seconds, the indicator auto-hides. Call reset() when exiting reduced resolution mode to allow the indicator to show again on next activation. Further show() calls while the toast is still visible refresh the displayed percentage in place (no re-show, no timer extension) so a multi-step DPR walk doesn't freeze the first value.

      Parameters

      • Optionalscale: number

        Current resolution as a fraction of native DPR (0..1]

      Returns void

    • Reset the indicator state when exiting reduced resolution mode

      This allows the indicator to show again on the next reduced resolution mode activation. Should be called when reduced resolution mode is turned OFF.

      Returns void

    • Update the text display

      Parameters

      • Optionalscale: number

        Current resolution as a fraction of native DPR (0..1]

      Returns void