New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buffer.uri / image.uri validator accepting non-relative uri only, and not resources served over http(s) #133
Comments
It's not an anti-pattern per se, since the validator issues a warning, not an error. The reasoning is simple: not all clients will acquire external resources from URIs with explicit schemas (be it As for babylon.js not loading resources over http, it may be an issue with VSCode plugin or Babylon. |
@xgui3783 If you're seeing this in VSCode, you can configure your
I did notice that my VSCode hookup of the validator isn't willing to fetch remote resources like this (I think I'm doing a simple file open on the uri, not a network request). But I'd be hesitant to change this as I'd worry about the security implications of allowing local glTFs to request arbitrary remote resources on behalf of the user. So I think I'll leave that behavior in place, unless there are strong reasons to change. Having the previewer do it is somewhat safer, as that's in a sandboxed webview. Not sure why Three works and Babylon does not. |
This could be a plugin setting (off by default) that allows |
Babylon assumes urls are relative by default. It will not work with absolute urls without custom settings. |
Hi all, thanks for your explanations.
this makes perfect sense.
noted. |
Hi all,
Firstly, thank you very much for the plugin, it has made the workflow much much easier.
I was working with a project where binary resources easily adaptable to gltf format already exists and are served over https. After generating buffer.uri with values such as
http://localhsot:3001/buffer
, the validator complains about NON_RELATIVE_URI.Is it an anti-pattern to serve buffer uri/image uri over http(s)?
coincidentally, gltf previewer, babylon.js does not load the buffer.uri served over http, but threejs does.
The text was updated successfully, but these errors were encountered: