use json;
use std::slice;
use {Document, Node};
#[derive(Clone, Debug)]
pub struct Joints<'a> {
pub(crate) document: &'a Document,
pub(crate) iter: slice::Iter<'a, json::Index<json::scene::Node>>,
}
impl<'a> Iterator for Joints<'a> {
type Item = Node<'a>;
fn next(&mut self) -> Option<Self::Item> {
self.iter
.next()
.map(|index| self.document.nodes().nth(index.value()).unwrap())
}
}