benforreal Posted April 15, 2019 Share Posted April 15, 2019 Hi all, Sorry for the lack of sandbox example, but I'm not even sure how i'd properly set this one up. Anyway, my issue is that I export my Babylon scene (as a GLB) along with some other assets as a zip file. This works AWESOME, I was surprised it was so easy. Importing is the problem. I can get the incoming asset as whatever (binary, or string). The problem is that when I load, it incorrectly parses the file - it gives me back my JSON + binary and says ": Unexpected token g in JSON at position 0". If I trace, it looks like it has no idea what importer to use, and appears to be defaulting to the Babylon format importer. So my question is, what is the correct mechanism to load a GLB file when I just have the data? I'm using: BABYLON.SceneLoader.ImportMesh('', 'data:' + content, myscene, () => { console.log('success')}); thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted June 14, 2019 Share Posted June 14, 2019 We have a new forum: forum.babylonjs.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.