OptionalcompressionHow 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.
OptionalencoderA 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).
OptionalpreserveKeep 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.
OptionalquantizationPer-attribute quantization bits (each an integer 1..30).
OptionalwasmThe 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.
The Draco encoder settings shared by encodeDraco and the
draco: trueexportGLTF path.