I changed the model with gltfpack, but I found that the request for these files took a long time. These files were all on https://preview.babylonjs.com. My babylon.js is located in the place. Although it is large, but it takes a short time.
Is there any way to use the local babylon.ktx2decoder.js and MSC_BASIS_TRANSCODER.JS when loading the model?
You can change the KhronosTextureContainer2.URLConfigKhronosTextureContainer2 | Babylon.js Documentation
i.e. KhronosTextureContainer2.URLConfig.jsDecoderModule = "https://somewebsite.com/babylon.ktx2Decoder.js".
However I wasn’t able to get the files relatively from the local project, it has to be an absolute path. As described in this Thread. I now set the paths by getting document.location.origin and adding to that.
Using relative urls should be possible. The code just doesn’t call Tools.GetAbsoluteUrl before storing the url. We do this for the Draco module, for example. Feel free to file a GitHub issue for this.