• Content Count

  • Joined

  • Last visited

About jeremejevs

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. As of this PR, it's no longer possible to load a scene from a local file: const sceneFile = new File('foo.babylon') const scene = await SceneLoader.LoadAsync('file:', sceneFile, engine) The only workaround I have found, which doesn't involve the inefficient conversion into a "data:" string, is this: import XMLHttpRequest from 'xmlhttprequest' global.XMLHttpRequest = XMLHttpRequest.XMLHttpRequest // ... const scene = await SceneLoader.LoadAsync('', 'file:foo.babylon', engine) It works, but I dislike having an extra dependency - "xmlhttprequest" - for no good reason. I've combed through the code, and looks like there's no alternative path. There's a handy utility called "LoadFile", but the only way to reach it without copy-pasting a ton of code is really convoluted, involving the "FilesInput.FilesToLoad" global. What's the rationale behind that PR? And would you mind adding the in-memory file support back? Edit: On the other hand, it appears I don't need to shim "FileReader" anymore with this new approach. Hmm. Either way, documenting the correct way to go about this would be greatly appreciated. Having a shimless way to load a local scene would be even better E.g. by just passing a Buffer. But I can live without that.