Declaration
Gltf_Channel :: struct @json(rename_all=camelCase) {
sampler: u32; target: Gltf_Animation_Target; 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)}Connects the animation sampler at index sampler to the property in target.
asset, error := gltf_load("{\"asset\":{\"version\":\"2.0\"},\"nodes\":[{}],\"buffers\":[{\"byteLength\":32,\"uri\":\"data:application/octet-stream;base64,AAAAAAAAgD8AAAAAAAAAAAAAAAAAAIA/AAAAQAAAQEA=\"}],\"bufferViews\":[{\"buffer\":0,\"byteLength\":32}],\"accessors\":[{\"bufferView\":0,\"componentType\":5126,\"count\":2,\"type\":\"SCALAR\",\"min\":[0],\"max\":[1]},{\"bufferView\":0,\"byteOffset\":8,\"componentType\":5126,\"count\":2,\"type\":\"VEC3\"}],\"animations\":[{\"samplers\":[{\"input\":0,\"output\":1}],\"channels\":[{\"sampler\":0,\"target\":{\"node\":0,\"path\":\"translation\"}}]}]}");
assert(error.kind == .NONE);
defer gltf_free(*asset);
channel := asset.document.animations[0].channels[0];
assert(channel.sampler == 0 && channel.target.node.value == 0);