-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - Fix MIME type support for glTF buffer Data URIs #3101
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alice-i-cecile
added
A-Assets
Load files from disk to use for things like images, models, and sounds
C-Bug
An unexpected or incorrect behavior
S-Needs-Review
and removed
S-Needs-Triage
This issue needs to be labelled
labels
Nov 10, 2021
alice-i-cecile
approved these changes
Nov 10, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the clear explanation!
I hit this issue when attempting to load some of the Khronos glTF sample models. |
mockersf
approved these changes
Nov 10, 2021
Can you also create a pr with these changes on top of the |
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Nov 11, 2021
# Objective - The glTF 2.0 spec requires that Data URIs use one of two valid MIME types. `bevy_gltf` only supports one of these. - See: - https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#_media_type_registrations - https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#file-extensions-and-media-types - https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#binary-data-storage > Buffer data **MAY** alternatively be embedded in the glTF file via `data:` URI with base64 encoding. When `data:` URI is used for buffer storage, its mediatype field **MUST** be set to `application/octet-stream` or `application/gltf-buffer`. (Emphasis in original.) ## Solution - Check for both MIME types.
bors
bot
changed the title
Fix MIME type support for glTF buffer Data URIs
[Merged by Bors] - Fix MIME type support for glTF buffer Data URIs
Nov 11, 2021
bors bot
pushed a commit
that referenced
this pull request
Nov 11, 2021
Apply #3101 on top of the `pipelined-rendering` branch, as requested by @cart in #3101 (comment) # Objective - The glTF 2.0 spec requires that Data URIs use one of two valid MIME types. `bevy_gltf2` only supports one of these. - See: - https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#_media_type_registrations - https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#file-extensions-and-media-types - https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#binary-data-storage > Buffer data **MAY** alternatively be embedded in the glTF file via `data:` URI with base64 encoding. When `data:` URI is used for buffer storage, its mediatype field **MUST** be set to `application/octet-stream` or `application/gltf-buffer`. (Emphasis in original.) ## Solution - Check for both MIME types.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
bevy_gltf
only supports one of these.(Emphasis in original.)
Solution