2024-01-12 19:09:29 +00:00
|
|
|
use crate::Component;
|
|
|
|
|
2024-01-13 16:51:16 +00:00
|
|
|
use lyra_math::{Vec3, Quat, Vec2, Vec4, Mat4, Transform};
|
2024-01-12 19:09:29 +00:00
|
|
|
|
2024-01-13 16:51:16 +00:00
|
|
|
macro_rules! impl_external_component {
|
2024-01-12 19:09:29 +00:00
|
|
|
($type: ident) => {
|
|
|
|
impl Component for $type {
|
|
|
|
fn name() -> &'static str {
|
|
|
|
stringify!($type)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2024-01-13 16:51:16 +00:00
|
|
|
impl_external_component!(Vec2);
|
|
|
|
impl_external_component!(Vec3);
|
|
|
|
impl_external_component!(Vec4);
|
|
|
|
impl_external_component!(Mat4);
|
|
|
|
impl_external_component!(Quat);
|
|
|
|
impl_external_component!(Transform);
|