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

Stop computing the glb length in the example #305

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wlinna
Copy link
Contributor

@wlinna wlinna commented Aug 1, 2021

to_writer computes the length internally, and the length provided in the header is ignored. Thus computing it yourself only adds complexity.

@IcanDivideBy0
Copy link
Collaborator

Hello, thanks!
It feels a bit weird to have a random zero in the middle of an example. IMO we should either add a comment to explain that length is recomputed anyways thus we can set the header length to whatever, or add an impl Default for Header. There's no much room for changing anything in the header:

  • magic: Must be b"glTF".
  • version: Must be 2.
  • length: is ignored most of the time ?

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.

2 participants