Hi, recently I made a React App with BabylonJS and wrapped it using Electron. This worked great and everything seemed ok until I tried to use the wrapped app on a device without an internet connection.
Is there a way to use BabylonJS that will work offline once built, it’s possible I’ve missed something but I’ve had a quick google and couldn’t see anything too helpful.
Thanks for your help
The short answer is yes you can. A longer answer is some features require more than the core babylon.js. For example, if you are importing assets you will need the loader script downloaded and for browser security issues and CORS compliance you will need to use a local server .
Framework Versions | Babylon.js Documentation.
If you are having issues running it offline then it would be useful to know what errors you are getting in the console.
Hello just checking in, was your question answered? @link2twenty
I was hoping for a slightly simpler solution but this works.
I now realise my question was poorly written, the answer I was looking for (though didn’t know it) was that I could update the draco comression urls and point them somewhere local.
DracoCompression.Configuration.decoder.wasmUrl = "./babylonjs/draco_wasm_wrapper_gltf.js";
DracoCompression.Configuration.decoder.wasmBinaryUrl = "./babylonjs/draco_decoder_gltf.wasm";
DracoCompression.Configuration.decoder.fallbackUrl = "./babylonjs/draco_decoder_gltf.js";