fast-mesh-wasm
    Preparing search index...

    Function encodeDraco

    • Encodes a triangle mesh into standalone Draco bytes (a .drc file): positions always, plus the normals/colors/uvs options when given. Positions encode as 32-bit floats (wider inputs narrow).

      The draco3d encoder (WASM) initializes on first use; its module is shared across calls. Needs the draco3d package installed unless options supplies the module or its .wasm.

      Decodes through decodeDraco (positions, faces and UVs: normals and colors need draco3d's own decoder).

      Parameters

      • positions: ArrayLike<number>
      • indices: ArrayLike<number>
      • Optionaloptions: DracoEncodeOptions

      Returns Promise<Uint8Array<ArrayBufferLike>>