window.kaolin
    Preparing search index...

    Function flattenMatrix

    • Convert various matrix formats to a flat 16-element array (row-major).

      Accepts nested arrays, a flat Float32Array / number[], and an array of typed-array rows (e.g. the binary wire format in util/io decodes a 4x4 view matrix into a list of per-row Float32Arrays).

      Parameters

      • matrix:
            | number[]
            | Float32Array<ArrayBufferLike>
            | number[][]
            | number[][][]
            | Float32Array<ArrayBufferLike>[]

      Returns number[]