2023-06-29 07:48:03 +02:00
|
|
|
use crate::core::Rectangle;
|
|
|
|
|
use crate::graphics::{Damage, Mesh};
|
|
|
|
|
|
2023-06-22 00:38:36 +02:00
|
|
|
pub type Primitive = crate::graphics::Primitive<Custom>;
|
|
|
|
|
|
2023-06-29 07:48:03 +02:00
|
|
|
#[derive(Debug, Clone, PartialEq)]
|
|
|
|
|
pub enum Custom {
|
|
|
|
|
Mesh(Mesh),
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Damage for Custom {
|
|
|
|
|
fn bounds(&self) -> Rectangle {
|
|
|
|
|
match self {
|
|
|
|
|
Self::Mesh(mesh) => mesh.bounds(),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|