use ecs::Component; use crate::vector::Vec3; /// A position in 3D space. #[derive(Debug, Default, Clone, Copy, Component)] pub struct Position { pub position: Vec3, } impl From> for Position { fn from(position: Vec3) -> Self { Self { position } } } /// Scaling of a 3D object. #[derive(Debug, Clone, Copy, Component)] pub struct Scale { pub scale: Vec3, } impl From> for Scale { fn from(scale: Vec3) -> Self { Self { scale } } } impl Default for Scale { fn default() -> Self { Self { scale: Vec3 { x: 1.0, y: 1.0, z: 1.0 }, } } }