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

    Function preloadNeighbourIndex

    • The neighbour of level currentIdx worth making resident ahead of a switch, or -1: the level across whichever of currentIdx's two boundaries lies within a band of metric. Boundary b is the activation threshold of level b (thresholds[b], between levels b − 1 and b); its band half-width is fraction · min(gap below, gap above) — the gap above the finest boundary is taken equal to the gap below — so the band is the same share of a step at every level of a geometrically spaced ladder and, for fraction ≤ 0.5, no two bands overlap. When the metric is inside the bands of both boundaries (possible only for fraction > 0.5), the nearer wins.

      This is the band the retired coverage cross-fade DREW both levels in; the registry now only LOADS the neighbour there (LODGroupRegistry.preloadNeighbour). Returns -1 for fraction <= 0, an out-of-range currentIdx or a degenerate (zero-width) band. Allocation-free: it runs per group per frame.

      Parameters

      • thresholds: readonly number[]
      • currentIdx: number
      • metric: number
      • fraction: number

      Returns number