Split a .glb container into its JSON document and its binary chunk.
The layout is a 12 byte header (magic glTF, version, total length)
followed by chunks, each with an 8 byte header (length, type) and data
padded to a multiple of 4 bytes. The first chunk is the JSON, the
optional second one is the binary buffer. The binary chunk is returned
as a view into data, not a copy.
Split a
.glbcontainer into its JSON document and its binary chunk.The layout is a 12 byte header (magic
glTF, version, total length) followed by chunks, each with an 8 byte header (length, type) and data padded to a multiple of 4 bytes. The first chunk is the JSON, the optional second one is the binary buffer. The binary chunk is returned as a view intodata, not a copy.