Skip to content
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

Hope to support compressing GLTF files with image URIs as HTTP addresses into GLB format #649

Open
terrykingcha opened this issue Nov 15, 2023 · 0 comments

Comments

@terrykingcha
Copy link

As mentioned in my title, in our GLTF, the textures are accessed independently on the CDN. Our 3D engine also supports reading separate image CDN addresses in GLTF/GLB. I hope this tool can support this situation.

Of course, before making this request, I also carefully read the code. The modifications I tried myself may involve four areas.

  1. In .writeResource.js - lines 53 to 55, skip the processing of ForEach.image when supported parameters are active.
  2. In readResource.js - the readResource method, add a check for the 'http(s)' protocol before the final return, and directly return the URI.
  3. In readResource.js - lines 54 to 56, skip the processing of ForEach.image when supported parameters are active.
  4. In FileUrl.js - the fileURLToPath method, add a check for the 'http(s)' protocol between the two conditions, and directly return the path.

Based on the modifications mentioned above, I have successfully run them on my local code. However, a more comprehensive design would ideally be advanced by the official team. Thank you.

Attached is the screenshot of the part of the code I modified.

screenshot-20231115-222529
screenshot-20231115-222715
screenshot-20231115-222645
screenshot-20231115-222616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant