gltf-reader 0.1.0

A simple glTF 2.0 reader using `serde` and `serde_json`
Documentation
use alloc::borrow::Cow;
use alloc::vec::Vec;
use ownable::IntoOwned;
use serde::Deserialize;

use crate::accessor::Accessor;
use crate::node::Node;
use crate::{Extensions, Extras, Idx};

/// Joints and matrices defining a skin.
#[derive(Debug, Clone, Deserialize, IntoOwned)]
pub struct Skin<'a> {
    /// The user-defined name of this object.
    #[serde(borrow)]
    pub name: Option<Cow<'a, str>>,

    /// The index of the node used as a skeleton root.
    pub skeleton: Option<Idx<Node<'static>>>,
    /// Indices of skeleton nodes, used as joints in this skin.
    pub joints: Vec<Idx<Node<'static>>>,
    /// The index of the accessor containing the floating-point 4x4 inverse-bind matrices.
    #[serde(rename = "inverseBindMatrices")]
    pub inverse_bind_matrices: Option<Idx<Accessor<'static>>>,

    #[serde(borrow)]
    pub extensions: Option<Extensions<'a>>,
    #[serde(borrow)]
    pub extras: Option<Extras<'a>>,
}