Esc

Gltf_Light_Type

enumextensionsince 0.36.1Source
  • macOS: Gltf_Light_Type works on macOS
  • Linux: Gltf_Light_Type works on Linux
  • Windows: Gltf_Light_Type works on Windows
  • Wasm: Gltf_Light_Type works on Wasm

Declaration

Gltf_Light_Type :: enum u8 {
    DIRECTIONAL;    POINT;    SPOT;}

The kind of a KHR_lights_punctual light.

Example↗
#import "Extensions/Json";

asset, error := gltf_load("{\"asset\":{\"version\":\"2.0\"},\"extensionsUsed\":[\"KHR_lights_punctual\"],\"extensions\":{\"KHR_lights_punctual\":{\"lights\":[{\"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[0].type == .POINT);
free_json(*lights);

See also