Declaration
Gltf_Lights :: struct @json(rename_all=camelCase) {
lights: [] Gltf_Light; @json(default,skip_serializing_if=empty)}KHR_lights_punctual on the document: the list of lights that nodes refer to by index. Release it
with free_json.
#import "Extensions/Json";
asset, error := gltf_load("{\"asset\":{\"version\":\"2.0\"},\"extensionsUsed\":[\"KHR_lights_punctual\"],\"extensions\":{\"KHR_lights_punctual\":{\"lights\":[{\"type\":\"directional\"},{\"type\":\"point\"}]}}}");
assert(error.kind == .NONE);
defer gltf_free(*asset);
lights, found, _ := gltf_extension(*asset.document.extensions, "KHR_lights_punctual", Gltf_Lights);
assert(found && lights.lights.count == 2);
free_json(*lights);