Babylon not working?

I am trying to reproduce the problem on PlayGround, but I don’t see the draco url request on the PG like my project does.

How come the PG can use .gltf without draco thingy??

PG

My project

Thank you so much for answering. I feel really close to solving the problem now. At least, now I know what is going on.

It should be reproducible, because you are saying the preview URL is loaded instead of the one you set in the configuration. So it doesn’t matter what URL you set, it should simply fail loading the fake URL you set.

About your project vs. playground - AFAIK Draco compression is only used when the model requires it. So you need to load a draco-compressed model in order to get the playground to work.

About your project vs. playground - AFAIK Draco compression is only used when the model requires it. So you need to load a draco-compressed model in order to get the playground to work.

=> OMG You are right!! I totally missed that part!! YES!

It should be reproducible, because you are saying the preview URL is loaded instead of the one you set in the configuration. So it doesn’t matter what URL you set, it should simply fail loading the fake URL you set.

=> um so I copied from “https://preview.babylonjs.com/draco_wasm_wrapper_gltf.js” and uploaded on the FTP so that I can use it and set it to DracoCompression.Configuration.decoder.wasmUrl

That should be the way to go. If you can’t reproduce this on the playground it is something with your projects - the files are not hosted correctly, the server sends an incorrect mime type, something is wrong with the configuration, no idea.
We will be able to help if you reproduce this. Otherwise it is up to you to understand your project’s setup and fix it

Let me thank you again for your help. I will try to reproduce the problem on the PlayGround somehow and share on the weekend if I can.

1 Like

I don’t know if you are already doing this, but make sure you host/copy at least the first 2 files, not just wasmUrl. The wasmUrl and wasmBinary must come in pairs as they work together. You can null out the fallbackUrl if all of your target browsers support WebAssembly.

1 Like

Ohh~!! I see! So I need to set two properties, not just one.

So it will be something like

DracoCompression.Configuration.decoder.wasmUrl = `wasm file location in my project`
DracoCompression.Configuration.decoder.wasmUrl = `wasm binary file location in my project`

//OR

DracoCompression.Configuration = {
        decoder: {
            wasmUrl: "<location in my project>",
            wasmBinaryUrl: "<location in my project>",
        }
    };