Glb Reader
object GlbReader
Reads a glTF 2.0 binary container (GLB) blob into its JSON chunk + BIN chunk. The format:
Bytes 0..3 : magic = "glTF" (0x46546C67)
Bytes 4..7 : version (uint32 LE) = 2
Bytes 8..11 : byteLength (uint32 LE)
Then N chunks, each:
chunkLength (uint32 LE)
chunkType (4 bytes ASCII; "JSON" = 0x4E4F534A, "BIN\0" = 0x004E4942)
chunkData (chunkLength bytes)Content copied to clipboard
The first chunk is always JSON; the second (when present) is BIN. Any further chunks are extensions and ignored.
Throws IllegalArgumentException on a structural mismatch — callers (the b3dm/i3dm loaders, the 3D Tiles 1.1 GLB content path) translate that into a logged failure on the tile.