Given the fact that Iâm a rookie, guessed that downloading the framework version from your github page (Release 8.33.4 ¡ BabylonJS/Babylon.js) would be independent of your CDN. I know it was very naive from me, but just playing around with BABYLON. So, how can I make my files of the framework version independent from your CDN. Do I have to change the base URLs to âmy.wonderfull.serverâ and transpile again the TS BABYLON forked files to javascript? Excuse me if asking a stupid question. Just a noobe! By the way, is there a way to modify the base URL to avoid transpiling thing? Not familiar with TS. I know itâs contrary to the tree-shaking structure, and also sounds lazy, is there a way, for guys like me, that just want to use the javascript bundle compact standalone version of BABYLON?
The main source of confusion is the lack of a definitive list of Babylon CDN resources needed to create a self-contained, local setup. A secondary challenge is understanding how to correctly integrate the necessary links into the code.
A potential solution would be a single script - such as an ExternalResourceLocalizer - that handles all external dependencies. By importing this script and its associated resources, developers could achieve a fully local Babylon configuration.
I like that idea a lot. Initially we tried to document it in this page:
Documentation/content/setup/frameworkPackages/CDN.md at 128eb8d0b6e4441795bb5d28892aa737cf15145e ¡ BabylonJS/Documentation
Do you see missing things there?
Live: Babylon.js docs
Tryied @alexchuber 8th comment suggestion, with just the resources needed for my webpage, and the inclusion of the suggested code by @alexchuber in line 2 of my script file (âBABYLON.Tools.ScriptBaseUrl = â./your_babylon_base_directoryâ â) and it worked for me. At first, after line inclusion, browser throw glslang not found error, but it was because didât had the resource in the folder, after copied browser throw the twgsl error, but once copied local no errors. Suggest to try the @alexchuber solution at least for basic and elementary webpages and/or webapps, in case you need to rely on your local copy of BABYLON.
I am not sure that this list is complete, I donât see even scene.createDefaultEnvironment() ![]()
do you mind updating that doc? Letâs make sure we have everything lol
I donât mind but probably there are some other external assets which may be missed?
Do Havok or Recast work when CDN is down? I havenât check personally, but maybe somebody knows the answer ![]()
Also, this line also needs correction since it is related only to some resources, not all resources (no environment files).
Yes I do agree. Letâs already do some of the changes. Letâs see for havoc (@Cedric ) or recast(@roland)
We may not get all of it in one shot but we will improve over time:)
Recast is loaded from https://unpkg.com/@recast-navigation.
You can also inject your own Recast instance:
export async function InitRecast(options?: { version?: string; instance?: RecastInjection });
export type RecastInjection = typeof import("@recast-navigation/core") & typeof import("@recast-navigation/generators");
Is there a way to choose .bin file URL for AreaLight?
cc @srzerbetto
I donât want to be a pain in the asgard of nobody, but there are 33 references to â.babylonjs.comâ, in the babylos.js file, including following list (cdn, core, assets, preview, snipet, controllers, and playground). So, the line âBABYLON.Tools.ScriptBaseUrl = â./babylonâ;â that I used in my code to load everything from âmy.wonderfull.serverâ will still working if using assets, the babylon loading logo, or other features?
1 https://cdn.babylonjs.com
2 https://assets.babylonjs.com/core
3,4 preview.babylonjs.com, cdn.babylonjs.com (same code line)
5 https://cdn.babylonjs.com/babylon.ktx2Decoder.js
6 https://snippet.babylonjs.com
7 https://cdn.babylonjs.com/Assets/vrButton.png
8 https://assets.babylonjs.com/core/environments/backgroundGround.png
9 https://assets.babylonjs.com/core/environments/backgroundSkybox.dds
10 https://assets.babylonjs.com/core/environments/environmentSpecular.env
11 âhttps://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypesâ (Just text)
12 https://controllers.babylonjs.com/generic/
13 Same as 12
14 https://assets.babylonjs.com/core/nme/currentScreenPostProcess.png
15 https://cdn.babylonjs.com/Assets/vrButton.png
16 https://assets.babylonjs.com/core/HandMeshes/
17 https://assets.babylonjs.com/core/HandMeshes/handsShader.json
18 https://assets.babylonjs.com/core/areaLights/areaLightsLTC.bin
19 https://cdn.babylonjs.com/Assets/babylonLogo.png
20 https://cdn.babylonjs.com/Assets/loadingIcon.png
21 //playground.babylonjs.com/textures/player.png
22 https://assets.babylonjs.com/textures/blue_noise/blue_noise_rgb.png
23 https://assets.babylonjs.com/core/nme/currentScreenPostProcess.png
24 https://assets.babylonjs.com/particles
25 https://assets.babylonjs.com/core/textures/flare.png
26 https://assets.babylonjs.com/textures/flare.png
27 https://assets.babylonjs.com/textures/blue_noise/blue_noise_rgb.png
28 https://controllers.babylonjs.com/generic/
29 https://controllers.babylonjs.com/microsoft/
30 https://controllers.babylonjs.com/oculus/
31 https://controllers.babylonjs.com/oculusQuest/
32 https://controllers.babylonjs.com/generic/
33 https://controllers.babylonjs.com/vive/
Ir really depends on what you use. If you are doing XR we may need to load the hand meshes if you do not provide yours, etcâŚ
The best way would be to run your experience and look at the network monitor to see the requests to *.babylonjs.com