fast-mesh-wasm
    Preparing search index...

    Interface DracoCompressionOptions

    The Draco encoder settings shared by encodeDraco and the draco: true exportGLTF path.

    interface DracoCompressionOptions {
        compressionLevel?: number;
        encoderModule?: unknown;
        preserveFaceOrder?: boolean;
        quantizationBits?: DracoQuantizationBits;
        wasmBinary?: ArrayBuffer | Uint8Array<ArrayBufferLike>;
    }

    Hierarchy (View Summary)

    Index
    compressionLevel?: number

    How hard the encoder squeezes: an integer 0..10, defaulting to 5. Higher levels encode slower into fewer bytes (the encode/decode speeds run at 10 - level); 0 is the fastest encode.

    encoderModule?: unknown

    A ready draco3d encoder module, as createEncoderModule resolves. When omitted, one is created from the draco3d package and shared across calls. Pass one in to reuse a module (or to supply the .wasm in an environment the default lookup cannot reach, like a bundled Worker).

    preserveFaceOrder?: boolean

    Keep the decoded faces (and vertices) in input order via sequential encoding. Defaults to false: the edgebreaker reorders faces while compressing better. Either way the same triangles decode.

    quantizationBits?: DracoQuantizationBits

    Per-attribute quantization bits (each an integer 1..30).

    wasmBinary?: ArrayBuffer | Uint8Array<ArrayBufferLike>

    The encoder .wasm bytes, forwarded to createEncoderModule when the shared module is created. Bundlers cannot always locate draco3d's own .wasm next to its glue (Vite workers, inlined builds): fetch the encoder asset (a ?url import of draco3d/draco_encoder.wasm) and pass its bytes here. Ignored when encoderModule is given.