Skip to content

Commit

Permalink
[#72] Add Neckline::None
Browse files Browse the repository at this point in the history
  • Loading branch information
Orchaldir committed Sep 17, 2023
1 parent c907124 commit 0b86430
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion rpg_tools_core/src/model/equipment/appearance/shirt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ pub struct Shirt {
#[derive(Convert, ui, Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
pub enum Neckline {
Boat,
#[default]
Crew,
DeepV,
#[default]
None,
Scoop,
V,
}
Expand Down
3 changes: 2 additions & 1 deletion rpg_tools_rendering/src/rendering/equipment/shirt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fn add_neckline(aabb: &AABB, torso: &TorsoConfig, shirt: &Shirt, builder: &mut P
Neckline::Boat => add_round(&aabb, torso, builder, 0.7, 0.05),
Neckline::Crew => add_round(&aabb, torso, builder, 0.3, 0.1),
Neckline::DeepV => add_v(&aabb, torso, builder, 0.4),
Neckline::None => {}
Neckline::Scoop => add_round(&aabb, torso, builder, 0.5, 0.2),
Neckline::V => add_v(&aabb, torso, builder, 0.2),
}
Expand All @@ -42,7 +43,7 @@ fn add_round(
) {
let width = torso.shoulder_width * width;
builder.add_mirrored_points(&aabb, width, 0.0, true);
builder.add_mirrored_points(&aabb, width, depth, false);
builder.add_mirrored_points(&aabb, width * 0.7, depth, false);
}

fn add_v(aabb: &&AABB, torso: &TorsoConfig, builder: &mut Polygon2dBuilder, depth: f32) {
Expand Down

0 comments on commit 0b86430

Please sign in to comment.