wasm-spatial-core
    Preparing search index...

    Function meshToGlb

    • Convert a generic indexed mesh directly to a GLB file (TRIANGLES primitive mode).

      Arguments

      • vertices: Float32Array [x0, y0, z0, x1, y1, z1, ...]
      • indices: Uint32Array [i0, i1, i2, ...]
      • normals: Optional Float32Array [nx0, ny0, nz0, ...]

      Returns

      Uint8Array containing the complete GLB binary.

      Parameters

      • vertices: Float32Array
      • indices: Uint32Array
      • Optionalnormals: Float32Array<ArrayBufferLike> | null

      Returns Uint8Array