Include the draco files in release?

To be able to not be dependant on other cdns / domains, I would like to include the draco files within my own app.

I found the config variable needed

DracoCompression.Configuration = {
  decoder: {
    wasmUrl: process.env.PUBLIC_URL + '/assets/draco/draco_wasm_wrapper_gltf.js',
    wasmBinaryUrl: process.env.PUBLIC_URL + '/assets/draco/draco_decoder_gltf.wasm',
    fallbackUrl: process.env.PUBLIC_URL + '/assets/draco/draco_decoder_gltf.js',
  }
}

But I could not find the decoder files anywhere in the npm release
https://unpkg.com/@babylonjs/loaders@4.0.0-alpha.32/glTF/2.0/Extensions/

which means I had to manually copy them over which isn’t good.

Would it be possible to include them within the release?

First I thought, maybe I should include the draco package and take them from there, but there was no wasm file to be found there either
https://unpkg.com/draco3d@1.3.4/

Any suggestions?

1 Like

@bghgary would you be able to help with this?

The easiest way to get these files is to grab them from the CDN:

Specifically,
https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js
https://preview.babylonjs.com/draco_decoder_gltf.wasm
https://preview.babylonjs.com/draco_decoder_gltf.js

If you want the latest draco files, you can get them from Draco’s repo here: