Esc

Gltf_Interpolation

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

Declaration

Gltf_Interpolation :: enum u8 {
    LINEAR;    STEP;    CUBICSPLINE;}

How an animation sampler blends between keyframes. The default is .LINEAR.

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].samplers[0].interpolation == .LINEAR); // the default

See also