Skip to content

Commit cc25a2b

Browse files
committed
materials>0 != materials.is_empty
1 parent 05b921b commit cc25a2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/geometry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl ToSimpleMeshWithMaterial for Mesh {
101101
tri.v3.y = self.positions[(self.indices[x * 3 + 2] * 3 + 1) as usize];
102102
tri.v3.z = self.positions[(self.indices[x * 3 + 2] * 3 + 2) as usize];
103103

104-
if materials.is_empty() {
104+
if !materials.is_empty() {
105105
let material = &materials[self.material_id.unwrap()];
106106
tri.color = (
107107
(material.diffuse[0] * 255.0) as u8,

0 commit comments

Comments
 (0)