rusting_engine 0.1.42

A high-performance Vulkano-based 3D engine with GPU physics.
Documentation
use crate::scene::object::Transform;
use std::sync::Arc;

// ? I dont want to describe it, maybe I will delete it, bc I dont like it.
#[derive(Clone)]
pub enum AnimationType {
    Rotate,
    Pulse,
    Static,
    Custom(
        Arc<dyn Fn(&mut Transform, &mut [f32; 3], &mut [f32; 3], &mut [f32; 3], f32) + Send + Sync>,
    ),
}

impl std::fmt::Debug for AnimationType {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            AnimationType::Rotate => write!(f, "Rotate"),
            AnimationType::Pulse => write!(f, "Pulse"),
            AnimationType::Static => write!(f, "Static"),
            AnimationType::Custom(_) => write!(f, "Custom Logic"),
        }
    }
}