File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 5454 < script src ="recast.js "> </ script >
5555 < script src ="https://rawcdn.githack.com/BabylonJS/Extensions/f43ab677b4bca0a6ab77132d3f785be300382760/ClonerSystem/src/babylonx.cloner.js "> </ script >
5656 < script src ="https://rawcdn.githack.com/BabylonJS/Extensions/785013ec55b210d12263c91f3f0a2ae70cf0bc8a/CompoundShader/src/babylonx.CompoundShader.js "> </ script >
57+ < script >
58+ // make sure the script base url is correct - should be the same as this page's origin
59+ BABYLON . Tools . ScriptBaseUrl = window . location . origin ;
60+ </ script >
5761 < script src ="sceneJs.js "> </ script >
5862 </ body >
5963</ html >
Original file line number Diff line number Diff line change @@ -203,6 +203,18 @@ let checkBabylonVersionAsync = function () {
203203
204204 return new Promise ( ( resolve ) => {
205205 loadInSequence ( frameworkScripts , 0 , resolve ) ;
206+ } ) . then ( ( ) => {
207+ // if local, set the default base URL
208+ if ( snapshot ) {
209+ // eslint-disable-next-line no-undef
210+ globalThis . BABYLON . Tools . ScriptBaseUrl = "https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/" + snapshot ;
211+ } else if ( version ) {
212+ // eslint-disable-next-line no-undef
213+ globalThis . BABYLON . Tools . ScriptBaseUrl = "https://cdn.babylonjs.com/v" + version ;
214+ } else if ( activeVersion === "local" ) {
215+ // eslint-disable-next-line no-undef
216+ globalThis . BABYLON . Tools . ScriptBaseUrl = window . location . protocol + `//${ window . location . hostname } :1337/` ;
217+ }
206218 } ) ;
207219} ;
208220
You can’t perform that action at this time.
0 commit comments