Hi,
I have just switched from “latest” to “preview” in my project and Draco decompression has broken. I have a situation where I need to run disconnected from the web so I have a local copy of the draco scripts and set the configuration like this
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',
}
}
where process.env.PUBLIC_URL equates to the root on my dev server (it is a React app). This all worked until I updated to 5.0 (I also downloaded “fresh” versions of the draco scripts from preview). Now I get this message…
Failed to execute ‘importScripts’ on ‘WorkerGlobalScope’: The URL ‘/assets/draco/draco_wasm_wrapper_gltf.js’ is invalid.
If I append that path to the browser address I do see the file. Has anything changed with the way DracoCompression.Configuration is handled? If I comment out my configuration block and use the default then it works, however this requires that I am connected to the web but for my solution I need it to work when not connected to the web.