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

Clarification regarding image entries #2377

Open
Cyphall opened this issue Apr 2, 2024 · 1 comment
Open

Clarification regarding image entries #2377

Cyphall opened this issue Apr 2, 2024 · 1 comment
Assignees
Milestone

Comments

@Cyphall
Copy link

Cyphall commented Apr 2, 2024

Hello, I have 2 questions about image entries that I cannot find the answer to in the specs:

  1. What happens when an image.uri points to a file which is missing?
    Does the GLTF asset file become invalid?
  2. What happens when an image entry has neither a uri field nor a bufferView field?
    This chapter seems to imply that at least one of them would be required but I could not find a place where it is explicitly stated.
@lexaknyazev lexaknyazev self-assigned this Apr 2, 2024
@lexaknyazev lexaknyazev added this to the 2.0.x milestone Apr 2, 2024
@lexaknyazev
Copy link
Member

Good catches!

What happens when an image.uri points to a file which is missing?

This doesn't make the glTF asset file itself invalid (as compared to, e.g., an URI syntax error) but of course prevents correct loading. A similar issue may happen if the file exists but cannot be decoded.

The spec does not currently provide any suggestions on how to handle unresolvable external references (this applies both to images and buffers); adding an implementation note seems reasonable.

What happens when an image entry has neither a uri field nor a bufferView field?

This would be invalid according to the JSON schema (Section A.21). This detail is not explicitly mentioned anywhere else so it also should be fixed.

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

No branches or pull requests

2 participants