gltf-reader 0.1.0

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

use crate::image::Image;
use crate::sampler::Sampler;
use crate::{Extensions, Extras, Idx};

/// A texture and it's sampler.
#[derive(Debug, Clone, Deserialize, IntoOwned)]
pub struct Texture<'a> {
    /// The user-defined name of this object.
    #[serde(borrow)]
    pub name: Option<Cow<'a, str>>,

    /// The index of the image used by this texture
    pub source: Option<Idx<Image<'static>>>,
    /// The index of the sampler used by this texture.
    pub sampler: Option<Idx<Sampler<'static>>>,

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