Esc

Gltf_Skin

structextensionsince 0.36.1Source
  • macOS: Gltf_Skin works on macOS
  • Linux: Gltf_Skin works on Linux
  • Windows: Gltf_Skin works on Windows
  • Wasm: Gltf_Skin works on Wasm

Declaration

Gltf_Skin :: struct @json(rename_all=camelCase) {
    inverse_bind_matrices: Json_Maybe(u32);    skeleton: Json_Maybe(u32);    joints: [] u32;    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)}

The joints that deform a mesh: the joint node indices, the optional skeleton root and inverse bind matrices accessor.

Example↗
asset, error := gltf_load("{\"asset\":{\"version\":\"2.0\"},\"nodes\":[{},{}],\"skins\":[{\"joints\":[1]}]}");
assert(error.kind == .NONE);
defer gltf_free(*asset);
skin := asset.document.skins[0];
assert(skin.joints.count == 1 && skin.joints[0] == 1);

See also