#[cfg(feature = "rapier")]
pub mod rapier;
#[cfg(feature = "avian")]
pub mod avian;
use bevy::{prelude::*, reflect::Reflectable};
use std::fmt;
use crate::prelude::*;
pub trait TiledPhysicsBackend:
Default
+ Clone
+ fmt::Debug
+ 'static
+ std::marker::Sync
+ std::marker::Send
+ FromReflect
+ Reflectable
{
fn spawn_colliders(
&self,
commands: &mut Commands,
source: TiledColliderSource,
origin: Entity,
multi_polygons_list: Vec<geo::MultiPolygon<f32>>,
) -> Option<Entity>;
}
pub(crate) fn plugin(_app: &mut App) {
#[cfg(feature = "avian")]
_app.register_type::<avian::TiledPhysicsAvianBackend>();
#[cfg(feature = "rapier")]
_app.register_type::<rapier::TiledPhysicsRapierBackend>();
}