Issues with self-deploying babylonjs CDN

Hello everyone, I am trying to deploy CDN myself and modify the resource loading path. I modified Tools.CDNBaseUrl,However, I found that some resources still request the default cdn path of babylonjs.

I cannot modify this default path when building my program. Is there an elegant solution?

cc @alexchuber

Could you share exactly which URLs you are configuring? Is it just Tools.CDNBaseUrl, or are there others like KhronosTextureContainer2.URLConfig or the Transcoder.WasmBaseUrl?

2 Likes

Sorry, this was my mistake. I only set CDNBaseUrl and ignored Babylon.js docs .
After configuring everything according to the documentation, everything works fine.

:smiling_face_with_tear:

1 Like

Great! Did you wind up providing each URL individually, or just set BABYLON.Tools.ScriptBaseUrl? We want to make sure everything works as-expected :smiley:

Following the documentation, I concatenated the base address. In my code, it ultimately looks like this:

After a quick check, I haven’t found any requests still pointing to “https://cdn.babylonjs.com/” for now.

2 Likes

@alexchuber it would be cool if the url in MeshOpt/Draco/KTX were also accounting for the baseURL in case it does not already ?

1 Like

Yeah, that’s what I’m thinking. I wouldn’t expect anyone to need to individually configure each URL. Will check this out later.

1 Like
2 Likes