Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • Concatenate a required typed-array field across parts.

      Allocates a fresh array of sum(countOf(part)) * perItem elements (using the first part's constructor, so the dtype is preserved) and copies each part in order.

      LADDER-DTYPE CONTRACT: every part must carry the field with the SAME typed-array dtype. TypedArray.set converts by VALUE, not by semantics — copying a later Uint8Array level (0..255 normalized) into a Float32Array output (0..1) would silently write 255× values, and Float32 into Uint8 truncates to garbage. The Python writer always emits one dtype per field across a ladder, so a mismatch means malformed data; fail fast with a descriptive error instead of rendering corruption.

      Type Parameters

      Parameters

      • parts: P[]

        Per-LOD data parts (assumed length ≥ 1).

      • get: (p: P) => A

        Extract the field from a part.

      • countOf: (p: P) => number

        Element count of a part (rows; multiplied by perItem).

      • perItem: number = 1

        Components per element (e.g. 3 for positions, 1 for widths).

      • label: string = 'field'

        Field name for the dtype-mismatch error message.

      • levelOf: (index: number) => number = ...

        Maps a parts index back to its LADDER level number, for the error message only. Identity unless the caller passed a filtered subset (see concatOptionalField's zero-row abstainers) — naming the wrong level in a corrupt-store diagnostic is worse than not naming one.

      Returns A