From 08fbff38fa146f1056d4e269c0b839d843f55b04 Mon Sep 17 00:00:00 2001 From: numzero Date: Mon, 10 Jun 2024 15:28:55 +0300 Subject: [PATCH] Rotate the view --- src/bin/flat.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/flat.rs b/src/bin/flat.rs index 538fad2..d568b32 100644 --- a/src/bin/flat.rs +++ b/src/bin/flat.rs @@ -1,4 +1,4 @@ -use std::f32::consts::PI; +use std::f32::consts::{FRAC_PI_2, PI}; use flo_draw::*; use flo_canvas::*; use glam::*; @@ -51,7 +51,8 @@ pub fn main() { .collect(); let space = Space { rect: tube, objs }; - gc.canvas_height(1000.0); + gc.canvas_height(500.0); + gc.transform(Transform2D::rotate(FRAC_PI_2)); tube.render(gc); gc.line_width(0.5); // gc.stroke_color(Color::Rgba(1.0, 0.5, 0.0, 0.5));