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

Support .glb files without a binary buffer #34

Merged
merged 1 commit into from
Feb 25, 2021
Merged

Support .glb files without a binary buffer #34

merged 1 commit into from
Feb 25, 2021

Conversation

qmuntal
Copy link
Owner

@qmuntal qmuntal commented Feb 25, 2021

The gltf spec allows to have a .glb file without a binary buffer so that all buffers are either encoded as base-64 or pointing to an external resource. https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#chunks.

The current implementation does not honor this use case and always skips the first buffer, even if it is not a binary buffer.

With this change the decoder will check if the first buffer is an binary buffer, and only if it is it will add the binary chunk to the file.

@qmuntal qmuntal merged commit 45021f3 into master Feb 25, 2021
@qmuntal qmuntal deleted the no-bin branch February 25, 2021 19:21
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

Successfully merging this pull request may close these issues.

1 participant