Hello, I have compressed GLB, and I need to load that GLB into a scene, but it gives me an error
I used below code
Can someone guide me to where I am doing wrong? Thanks
You need to set the KTX2Loader instance via setKTX2Loader() before you load your glTF asset. Similar to how DRACOLoader is configured.
According to your code, your are doing this in the onLoad() callback.
Are setDecoderPath and setTranscoderPath are correct?
If you use the latest three.js version, you have to change the paths from examples/js/libs to examples/jsm/libs.
We don’t know how your application is structured because you haven’t shared that, but it’s unusual to make HTTP requests into the node_modules directory. I would suggest just copying those files out of examples/js/libs/{draco,basis} and hosting them as static files in your application folder.
Thanks, it is working! ![]()