Draco compression (https://google.github.io/draco/)
This class wraps the Draco module.
The encoder is not currently implemented.
By default, the configuration points to a copy of the Draco decoder files for glTF from the babylon.js preview cdn https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js.
To update the configuration, use the following code:
DracoCompression.DecoderAvailable to determine if the decoder configuration is available for the current context.
To decode Draco compressed data, get the default DracoCompression object and call decodeMeshAsync:
var vertexData = await DracoCompression.Default.decodeMeshAsync(data);
The number of workers for async operations. Specify
0 to disable web workers and run synchronously in the current context.
The configuration. Defaults to the following urls:
Returns true if the decoder configuration is available.
Default instance for the draco compression object.
Default number of workers to create when creating the draco compression object.
Decode Draco compressed mesh data to vertex data.
The ArrayBuffer or ArrayBufferView for the Draco compression data
A map of attributes from vertex buffer kinds to Draco unique ids
A promise that resolves with the decoded vertex data
Stop all async operations and release resources.
Returns a promise that resolves when ready. Call this manually to ensure draco compression is ready before use.
a promise that resolves when ready
Generated using TypeDoc