Skip to content

Commit

Permalink
renamed public generate functions
Browse files Browse the repository at this point in the history
  • Loading branch information
salam99823 committed Nov 14, 2024
1 parent afa1f9c commit 56f3a2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions src/avian2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ use edges::{Edges, Vec2};
#[cfg(feature = "parallel")]
use rayon::prelude::*;

use crate::{
utils::{generate_collider, generate_multi_collider, heights_and_scale},
ColliderType,
};
use crate::{utils::heights_and_scale, ColliderType};

fn to_collider(collider_type: ColliderType, points: Vec<Vec2>) -> Option<Collider> {
match collider_type {
Expand All @@ -36,7 +33,7 @@ fn to_collider(collider_type: ColliderType, points: Vec<Vec2>) -> Option<Collide
}

#[must_use]
pub fn single_collider<I>(
pub fn generate_collider<I>(
image: I,
collider_type: ColliderType,
translated: bool,
Expand All @@ -52,7 +49,7 @@ where
}

#[must_use]
pub fn multi_collider<I>(
pub fn generate_colliders<I>(
image: I,
collider_type: ColliderType,
translated: bool,
Expand Down
9 changes: 3 additions & 6 deletions src/rapier2d.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use bevy_rapier2d::prelude::Collider;
use edges::{Edges, Vec2};

use crate::{
utils::{generate_collider, generate_multi_collider, heights_and_scale},
ColliderType,
};
use crate::{utils::heights_and_scale, ColliderType};

fn to_collider(collider_type: ColliderType, points: Vec<Vec2>) -> Option<Collider> {
match collider_type {
Expand All @@ -19,7 +16,7 @@ fn to_collider(collider_type: ColliderType, points: Vec<Vec2>) -> Option<Collide
}

#[must_use]
pub fn single_collider<I>(
pub fn generate_collider<I>(
image: I,
collider_type: ColliderType,
translate: bool,
Expand All @@ -35,7 +32,7 @@ where
}

#[must_use]
pub fn multi_collider<I>(
pub fn generate_colliders<I>(
image: I,
collider_type: ColliderType,
translate: bool,
Expand Down

0 comments on commit 56f3a2f

Please sign in to comment.