Skip to content

Commit 5ddf2d3

Browse files
committed
reorder Rhombus primitive vertices
1 parent eec7f3b commit 5ddf2d3

File tree

1 file changed

+4
-4
lines changed
  • crates/bevy_mesh/src/primitives

1 file changed

+4
-4
lines changed

crates/bevy_mesh/src/primitives/dim2.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -900,13 +900,13 @@ impl MeshBuilder for RhombusMeshBuilder {
900900
let [hhd, vhd] = [self.half_diagonals.x, self.half_diagonals.y];
901901
let positions = vec![
902902
[hhd, 0.0, 0.0],
903-
[-hhd, 0.0, 0.0],
904903
[0.0, vhd, 0.0],
904+
[-hhd, 0.0, 0.0],
905905
[0.0, -vhd, 0.0],
906906
];
907907
let normals = vec![[0.0, 0.0, 1.0]; 4];
908-
let uvs = vec![[1.0, 0.5], [0.0, 0.5], [0.5, 0.0], [0.5, 1.0]];
909-
let indices = Indices::U32(vec![1, 0, 2, 1, 3, 0]);
908+
let uvs = vec![[1.0, 0.5], [0.5, 0.0], [0.0, 0.5], [0.5, 1.0]];
909+
let indices = Indices::U32(vec![0, 1, 2, 2, 3, 0]);
910910

911911
Mesh::new(
912912
PrimitiveTopology::TriangleList,
@@ -922,7 +922,7 @@ impl MeshBuilder for RhombusMeshBuilder {
922922
impl Extrudable for RhombusMeshBuilder {
923923
fn perimeter(&self) -> Vec<PerimeterSegment> {
924924
vec![PerimeterSegment::Flat {
925-
indices: vec![0, 2, 1, 3, 0],
925+
indices: vec![0, 1, 2, 3, 0],
926926
}]
927927
}
928928
}

0 commit comments

Comments
 (0)