I assume you mean in a local project? The browser blocks access to file: for security reasons (which make a lot of sense - you could load files from my file system by sending me a playground).
What you can do is use a blob instead or serve/host the file using a webserver (which would be the best variant). In general, Babylon should support the file schema, if the browser supports it. if it doesn’t work we would be happy to try a working reproduction and see what is wrong, but my personal recommendation would be to never use the file protocol, or to use it as little as possible.
Thanks for the replies.
I guess I’m being not clear enough about the problem.
I’m talking about any project, not necessarily a local one. Specifically I’ve encountered the issue in our production server when users are not able to export bjs scenes to gltf.
Notice that I’m only providing a name of the texture for parsing, and bjs thinks (I assume “incorrectly thinks”) that this texture should be loaded from a local drive. Seems like this somehow fools the engine. Correct me if I’m wrong.
We have many places where we are checking if the provided URL has a protocol in it (like file or blob, for example), but I am not sure we are actually parsing the name. Would be great to see a reproducion.