Esc

Gltf_Path

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

Declaration

Gltf_Path :: enum u8 {
    TRANSLATION;    ROTATION;    SCALE;    WEIGHTS;    POINTER;}

Which property of a node an animation channel drives. POINTER is KHR_animation_pointer's target and needs the extension object on the target.

Example↗
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);
assert(asset.document.animations[0].channels[0].target.path == .TRANSLATION);

See also