Skip to content

Fix glTF interleaved attribute import - #963

Open
krapnikkk wants to merge 1 commit into
JannisX11:masterfrom
krapnikkk:agent/fix-gltf-interleaved-attributes
Open

Fix glTF interleaved attribute import#963
krapnikkk wants to merge 1 commit into
JannisX11:masterfrom
krapnikkk:agent/fix-gltf-interleaved-attributes

Conversation

@krapnikkk

Copy link
Copy Markdown

Fixes #962

What changed

  • Read vertex positions through BufferAttribute.getX/getY/getZ.
  • Read UVs and indices through attribute getters.
  • Bump gltf_importer to 1.2.1 and rebuild the committed bundle.

Root cause

GLTFLoader creates InterleavedBufferAttribute instances for glTF accessors that share a strided buffer view. Directly indexing .array assumes tightly packed attributes and ignores the interleaved stride and accessor offset, which corrupts vertex positions and UVs. The attribute getters handle both regular and interleaved buffers.

Validation

  • npm run build in plugins/gltf_importer/src
  • npm run validate gltf_importer
  • git diff --check

@krapnikkk
krapnikkk marked this pull request as ready for review August 3, 2026 16:02
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.

glTF importer corrupts interleaved vertex buffers

1 participant