We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11ac5fc commit 7c7f44bCopy full SHA for 7c7f44b
src/painter.rs
@@ -194,7 +194,15 @@ impl Painter {
194
let mut colors = Vec::with_capacity(mesh.vertices.len());
195
196
mesh.vertices.iter().enumerate().for_each(|(_i, v)| {
197
- pos.push(Point::new(v.pos.x, v.pos.y));
+ // Apparently vertices can be NaN and if they are NaN, nothing is rendered.
198
+ // Replacing them with 0 works around this.
199
+ let fixed_pos = if v.pos.x.is_nan() || v.pos.y.is_nan() {
200
+ Pos2::new(0.0, 0.0)
201
+ } else {
202
+ v.pos
203
+ };
204
+
205
+ pos.push(Point::new(fixed_pos.x, fixed_pos.y));
206
texs.push(Point::new(v.uv.x, v.uv.y));
207
colors.push(Color::from_argb(
208
v.color.a(),
0 commit comments