glb_stream 0.1.0
glb_stream: ^0.1.0 copied to clipboard
A pure-Dart streaming parser for glTF 2.0 binary container (.glb) files. Yields header + JSON chunk + binary chunk progressively from any Stream of bytes.
0.1.0 #
- Initial release.
GlbStreamParser.parse(Stream<List<int>>)yieldsGlbHeader,GlbJsonChunk, andGlbBinaryChunkDataevents progressively.- Pure Dart; no Flutter dependency; no native bindings; no
dart:iodependency (works on web). - Khronos glTF 2.0 GLB container spec compliance (header + JSON chunk + optional BIN chunk; 4-byte chunk alignment with
0x20/0x00padding). - 6 tests covering: minimal JSON-only GLB, GLB with binary chunk, progressive streaming across small reads (4 KB BIN via 17-byte chunks), non-GLB magic rejection, truncated header rejection, wrong chunk-type rejection.