donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.3k stars 145 forks source link

Unable join() primitives with TRIANGLE_STRIP or TRIANGLE_FAN modes #1312

Closed donmccurdy closed 3 months ago

donmccurdy commented 3 months ago

Testing against the v4 alpha release, we can successfully weld meshes with TRIANGLE_FAN or TRIANGLE_STRIP modes, but joining them creates broken output. Probably, these should be implicitly converted to TRIANGLES for the join step.

I haven't tested LINE_LOOP or LINE_STRIP, but similar issues may exist there. Probably worth adding join() test cases for all primitive modes.

donmccurdy commented 3 months ago

Example, from three.js discussion:

oval.gltf.zip