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::node::Node;
use crate::{Extensions, Extras, Idx};

/// The root nodes of a scene.
#[derive(Debug, Clone, Deserialize, IntoOwned)]
pub struct Scene<'a> {
    /// The user-defined name of this object.
    #[serde(borrow)]
    pub name: Option<Cow<'a, str>>,

    /// The indices of each root node.
    #[serde(default)] // default instead of option for ergonomics
    pub nodes: Vec<Idx<Node<'static>>>,

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