Skip to content

Buffer to short when adding an indices accessor for a primitive #445

Answered by donmccurdy
Rennzie asked this question in Q&A
Discussion options

You must be logged in to vote

The library includes a weld() function for computing indices, although I'm not sure I've tested it with LINES primitives yet. Could you try this?

import { weld } from '@gltf-transform/functions';

await document.transform(
  weld({tolerance: 1e-4})
);

If not, it might also be worth trying io.setVertexLayout(VertexLayout.SEPARATE) (before exporting the model) to see if that fixes whatever buffer layout issue is going on.

If none of that works, would you be able to share a sample input file?

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Rennzie
Comment options

@Rennzie
Comment options

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