pub mod polar;
pub mod position;
pub mod trackball;
pub mod viewport;
use crate::components::Snippet;

pub trait Transform {
    fn snippet(&self) -> &Snippet;

    fn chain(self, other: impl Transform) -> Self;
}

mod test {
    use super::*;

    #[test]
    fn test_transform() {
        let polar = polar::Polar::new().unwrap();
        let trackball = trackball::Trackball::new().unwrap();
        let polar_trackball = polar.chain(trackball);

        println!("{}", polar_trackball.snippet().prepare_code());

        // println!("{}", polar_trackball.snippet().call(vec![]));
    }
}
