Skip to content

Writing gltf model #552

Answered by raducal
raducal asked this question in Q&A
Apr 12, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Ok so it seems its because my face indices are 1 indexed but they should be 0 indexed. Changing that fixed the issue for smaller models but larger models still seem to be broken

EDIT: Changing face indices to Uint32Array fixes the larger model issue as well

  const indices = doc
    .createAccessor()
    .setArray(new Uint32Array(faces))
    .setType("SCALAR")
    .setBuffer(buffer);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@donmccurdy
Comment options

Answer selected by raducal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants