This is working perfect in your project! But, if I copy the folder “Draco Lib” in my project, it’s still doesn’t work.
In your project, if I do this:
var decoderModule = window.DracoDecoderModule;
//Print the content of draco.js
console.log("decoderModule",decoderModule);
I get an object:
But in my project, If I do the same thing, I get the content of draco.js:
Another strange thing is, in your project, you checked the draco scripts to be preload. But if you export/download the project, the config.js generated set these scripts to preload = false. Still, if you launch your exported project, the script will be loaded automatically.
I don’t have this behavior in my project. If I exported mine, preload is reset to false too in config.js, but my project will not load these scripts automatically, getting this error:
Error loading model: HeartDraco.glb [TypeError: Cannot read property 'buffer' of undefined] playcanvas-stable.min.js:1022
I manually edited my config.js to set the draco.js preload attribute to true. The script load but still, I get some error like:
Error loading model: HeartDraco.glb [TypeError: q.DecoderBuffer is not a constructor] playcanvas-stable.min.js:1022
It is like my project is not configured or set to use Draco…
Is it really just dropping Draco library files into the project? Did you manually create the folder and drop these scripts one by one or did you use another way?