Is it possible to make SceneLoader to load object instead of string?

so basically I wanna pass scene data as object to SceneLoader.LoadAsync but it seems to accept string only, So we need to stringify the object and pass, since we are receiving json object of scene that we saving in index db. Currently we are patching babylon js package, so I also raise PR for the same if you want that and think this is useful.

Hello @Bhushan_Wagh , how are you doing? I don’t think I fully understand you question. Is the JSON you are trying to send a GLB?

Hi, I am good, thanks for asking. No, its not a glb, we are serialising the scene using babylon js serialiser and we saving that json in browser’s index db and when get retrieve this json to load it we need to stringify this json object to load using Scene loader.

Right now it is not possible to load the object directly. That can be a feature request for the loader in the future. Adding @sebavan to the loop to get his thoughts on this.

Yeah, I have added patch in babylon js from our side to make it work on our side and I was wondering if you guys would be interested in integrating this. If yes, then I can raise a PR for the same.

Did anything come of this? We are planning on using babylon in our react native app but want to embed the gltf file vs having it load over the web (or loading it once and it stays cached even when the app is killed and re-opened). We are open to alternatives or even alternative file formats. Our app requires offline usage which is why we are looking for some help.

Completely missed it the first time… @bghgary was planing on some loaders update I wonder if this was part of it ?

1 Like