A minimal glTF 2.0 loader for Zig.
zigltf provides:
- Direct deserialization of the glTF 2.0 JSON schema
- External buffer loading
- Accessor resolution
- Primitive attribute slicing
- Scene graph iteration utilities
It is designed as a lightweight, engine-agnostic asset loading layer.
- No external dependencies
- Explicit buffer and accessor resolution
- Minimal interpretation beyond spec requirements
- JSON schema mirror (
GltfJson) - External
.binbuffer loading - Accessor byte-range resolution
- Typed
PrimitiveViewattribute access - Node iteration utilities (BFS and DFS)
- Scene root resolution
- GPU upload
- Animation runtime
- Skinning
- Morph targets
- Embedded data URIs
- Extension interpretation
- Scene graph transform evaluation
const zigltf = @import("zigltf");
const gltf = try zigltf.Gltf.init(raw, allocator, path);
defer gltf.deinit(allocator);
// Depth-First-Search iterator
if (gltf.roots()) |roots| {
var it = roots;
while (it.next()) |node| {
// process node
}
}