From a3347ce1d825d2eb602b1169fe596510bee6530a Mon Sep 17 00:00:00 2001 From: shnewto Date: Fri, 1 Mar 2024 09:42:27 -0700 Subject: [PATCH] remove the misuse compile check, there will be plenty of compile errors downstream if nothing's enabled --- Cargo.toml | 2 +- README.md | 8 ++++++-- src/lib.rs | 3 --- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 81cc292..ca72ece 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ keywords = ["bevy", "rapier", "png", "collider", "2d"] readme = "README.md" [features] -default = ["xpbd_2d"] +default = ["xpbd_2d","rapier2d"] xpbd_2d = ["dep:bevy_xpbd_2d"] rapier2d = ["dep:bevy_rapier2d"] diff --git a/README.md b/README.md index 60c40ab..88bf01c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Crates.io]()]() [![MIT/Apache 2.0]()]() -a library for generating bevy_rapier2d and bevy_xpbd_2d colliders, for bevy apps, from images with transparency +a library for generating 2d colliders, for bevy apps, from images with transparency ## example @@ -14,17 +14,21 @@ to see this in action you can run the example, with no args it generates a scene ### bevy_rapier2d +#### note that you must have the rapier2d feature enabled + ```sh cargo run --example rapier2d_colliders ``` ### bevy_xpbd_2d +#### note that you must have the xpbd_2d feature enabled + ```sh cargo run --example xpbd_2d_colliders ``` -you can also specify a path to an image yourself the example will attempt to generate one or more for the objects it finds +you can also specify a path to an image yourself the example will attempt to generate one or more convex_polyline colliders for the objects it finds ## about / why diff --git a/src/lib.rs b/src/lib.rs index e7af258..a8ed647 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,5 @@ #![doc = include_str!("../README.md")] -#[cfg(all(not(feature = "rapier2d"), not(feature = "xpbd_2d")))] -compile_error!("At least one of the features `rapier2d` or `xpbd_2d` must be enabled."); - mod collider; mod edge;