How do i get the underlying interleaved buffer(view)? #350
-
Hey, I am trying to use this lib to load a .glb model for a web-viewer. The model uses the "EXT_mesh_gpu_instancing" extension and contains nodes that links to some instanced attributes that are structured in an interleaved buffer defined by some bufferView. When using the Any help would be appreciated . Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! Because this project is primarily meant for enabling modifications to glTF data, it does de-interleave accessors during the loading process. This allows changes to individual accessors to be simpler and faster, rather than maintaining a strict buffer layout at each stage of the processing. Accessors can (optionally) be re-interleaved when writing back to a glTF file. If you'd like to interleave the attributes without exporting the whole file, you can find example code for that here: glTF-Transform/packages/core/src/io/writer.ts Lines 93 to 168 in 0b244d4 |
Beta Was this translation helpful? Give feedback.
Hi! Because this project is primarily meant for enabling modifications to glTF data, it does de-interleave accessors during the loading process. This allows changes to individual accessors to be simpler and faster, rather than maintaining a strict buffer layout at each stage of the processing. Accessors can (optionally) be re-interleaved when writing back to a glTF file.
If you'd like to interleave the attributes without exporting the whole file, you can find example code for that here:
glTF-Transform/packages/core/src/io/writer.ts
Lines 93 to 168 in 0b244d4