You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here is a stripped down example that makes nannou 0.15 panic. in 0.14.1 it works ok.
i have noticed the same issue with geom::path::Builder::new() and line_to.
use nannou::prelude::*;
fn main() {
nannou::sketch(view).size(640, 480).run();
}
fn view(app: &App, frame: Frame) {
let draw = app.draw();
frame.clear(BLACK);
let p1 = pt2(100.0, 100.0);
let p2 = pt2(100.0, 100.0); //if p2 is equal to p1 nannou v0.15 crashes. no to so in v0.14.1
//let p2 = pt2(100.0, -100.0); //here no problem
let mut points = Vec::new();
points.push((pt2(0.0, 0.0), rgb(1.0, 1.0, 0.8)));
points.push((p1, rgb(0.0, 0.0, 0.0)));
points.push((p2, rgb(0.0, 1.0, 0.0)));
points.push((pt2(-100.0, -100.0), rgb(1.0, 0.0, 0.0)));
draw.polygon().points_colored(points);
draw.to_frame(app, &frame).unwrap();
}
mitchmindtree
changed the title
panic with equals points in v0.15
Drawing a polygon panics if two consecutive points are equal as of v0.15
Feb 27, 2021
here is a stripped down example that makes nannou 0.15 panic. in 0.14.1 it works ok.
i have noticed the same issue with geom::path::Builder::new() and line_to.
macOS 10.14.6, rustc 1.48.0
The text was updated successfully, but these errors were encountered: