Skip to content

Commit

Permalink
Merge pull request #1861 from hannobraun/window
Browse files Browse the repository at this point in the history
Rename `window::run` to `display`
  • Loading branch information
hannobraun authored Jun 6, 2023
2 parents d50d3da + 8a369f1 commit 259ee38
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use winit::{

use crate::window::{self, Window};

/// Initializes a model viewer for a given model and enters its process loop.
pub fn run(mesh: Mesh<Point<3>>, invert_zoom: bool) -> Result<(), Error> {
/// Display the provided mesh in a window that processes input
pub fn display(mesh: Mesh<Point<3>>, invert_zoom: bool) -> Result<(), Error> {
let event_loop = EventLoop::new();
let window = Window::new(&event_loop)?;
let mut viewer = block_on(Viewer::new(&window))?;
Expand Down
6 changes: 3 additions & 3 deletions crates/fj-window/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! # Fornjot Model Viewer
//! # Fornjot Window Abstraction
//!
//! [Fornjot] is an early-stage b-rep CAD kernel written in Rust. The kernel is
//! split into multiple libraries that can be used semi-independently, and this
Expand All @@ -10,7 +10,7 @@
#![warn(missing_docs)]

mod run;
mod display;
mod window;

pub use self::run::{run, Error};
pub use self::display::{display, Error};
2 changes: 1 addition & 1 deletion crates/fj/src/handle_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ where
if let Some(path) = args.export {
crate::export::export(&mesh, &path)?;
} else {
crate::window::run(mesh, false)?;
crate::window::display(mesh, false)?;
}

Ok(())
Expand Down

0 comments on commit 259ee38

Please sign in to comment.