Declaration
Gltf_Node :: struct @json(rename_all=camelCase) {
children: [] u32; @json(default,skip_serializing_if=empty) mesh: Json_Maybe(u32); skin: Json_Maybe(u32); camera: Json_Maybe(u32); matrix: [] float32; @json(default,skip_serializing_if=empty) rotation: [] float32; @json(default,skip_serializing_if=empty) scale: [] float32; @json(default,skip_serializing_if=empty) translation: [] float32; @json(default,skip_serializing_if=empty) weights: [] float32; @json(default,skip_serializing_if=empty) name: string; @json(default,skip_serializing_if=empty) extensions: Json_Value; @json(default,skip_serializing_if=null) extras: Json_Value; @json(default,skip_serializing_if=null)}A node in the scene hierarchy: it may place a mesh, skin or camera and has either a matrix or
translation, rotation and scale. children and the references are indices.
asset, error := gltf_load("{\"asset\":{\"version\":\"2.0\"},\"nodes\":[{\"name\":\"parent\",\"translation\":[1,2,3],\"children\":[1]},{}]}");
assert(error.kind == .NONE);
defer gltf_free(*asset);
parent := asset.document.nodes[0];
assert(parent.translation[1] == 2 && parent.children[0] == 1);
assert(parent.mesh.state == .MISSING);