Skip to main content

Function: attachFidelityIndicator()

attachFidelityIndicator(viewport): () => void

Attaches the fidelity indicator to a viewport that can report fidelity.

Default UI is the fidelity label in the top-right while the view is loading, lod or lossy; a lossless view shows nothing. When init({ debug: { fidelityIndicatorDebug: true } }) is set, the verbose debug badge is also shown in the top-left.

The indicator is a consumer of viewport.getFidelityLines() and VIEWPORT_FIDELITY_CHANGED (GENVIEW-FIDELITY-7). It never fires that event. Apps that need the absolute record use getFidelityState(). It does not read actors or mappers.

Replaces any existing attachment for this viewport (including the engine default). When init({ dangerouslyDisableFidelityIndicator: true }) is set, this detaches any existing indicator and is otherwise a no-op.

While degraded, a permanent label reads "Low Fidelity" or "Transient Low Fidelity" (FIDELITY-UI-2). Hover details use clinician copy from the absolute fidelity record (FIDELITY-UI-5).

Parameters​

• viewport: Viewport

Returns​

Function

a function that removes the indicator and its listeners

Returns​

void

Defined in​

packages/core/src/RenderingEngine/helpers/fidelityIndicator/attachFidelityIndicator.ts:68