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

    Function initializeDims

    • Initializes a SimpleDims object from points position data.

      This function creates the initial dimension state for nD visualization, inferring the number of dimensions from the data structure and setting up sensible defaults for display and navigation.

      Design decisions:

      • Non-displayed dimensions start at position 0 (minimum) for predictable behavior
      • Displayed dimensions are chosen from metadata or default to last 3 (spatial)
      • Maximum of 3 dimensions can be displayed simultaneously

      Parameters

      • numPoints: number

        Number of points in the dataset

      • totalElements: number

        Total elements in the positions array (numPoints * ndim)

      • Optionalmetadata: DimensionMetadata[]

        Optional metadata describing each dimension's properties

      Returns SimpleDims

      Initialized SimpleDims object ready for use

      Error if the positions array structure is invalid

      — no production call site; the only remaining caller is src/tests/unit/types/dims.test.ts, which imports it from this module directly (the types barrel that also re-exported it is gone).