summaryrefslogtreecommitdiff
path: root/engine/src/mesh/cube.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/mesh/cube.rs')
-rw-r--r--engine/src/mesh/cube.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/engine/src/mesh/cube.rs b/engine/src/mesh/cube.rs
index e91cf0e..fe45a4a 100644
--- a/engine/src/mesh/cube.rs
+++ b/engine/src/mesh/cube.rs
@@ -1,7 +1,7 @@
+use crate::builder;
use crate::data_types::dimens::Dimens3;
use crate::math::calc_triangle_surface_normal;
use crate::mesh::{Mesh, Vertex};
-use crate::builder;
use crate::vector::{Vec2, Vec3};
builder! {
@@ -216,14 +216,14 @@ impl FaceVertices
{
match face_location {
FaceLocation::RightUp => {
- self.vertices[0].texture_coords = Vec2 { x: 1.0, y: 1.0 };
- self.vertices[1].texture_coords = Vec2 { x: 0.0, y: 1.0 };
- self.vertices[2].texture_coords = Vec2 { x: 1.0, y: 0.0 };
+ self.vertices[0].texture_coords = Vec2 { x: 1.0, y: 1.0 }.into();
+ self.vertices[1].texture_coords = Vec2 { x: 0.0, y: 1.0 }.into();
+ self.vertices[2].texture_coords = Vec2 { x: 1.0, y: 0.0 }.into();
}
FaceLocation::LeftDown => {
- self.vertices[0].texture_coords = Vec2 { x: 0.0, y: 1.0 };
- self.vertices[1].texture_coords = Vec2 { x: 0.0, y: 0.0 };
- self.vertices[2].texture_coords = Vec2 { x: 1.0, y: 0.0 };
+ self.vertices[0].texture_coords = Vec2 { x: 0.0, y: 1.0 }.into();
+ self.vertices[1].texture_coords = Vec2 { x: 0.0, y: 0.0 }.into();
+ self.vertices[2].texture_coords = Vec2 { x: 1.0, y: 0.0 }.into();
}
};