diff --git a/crates/fj-window/src/run.rs b/crates/fj-window/src/display.rs similarity index 97% rename from crates/fj-window/src/run.rs rename to crates/fj-window/src/display.rs index d728a7bc5..f02f731f9 100644 --- a/crates/fj-window/src/run.rs +++ b/crates/fj-window/src/display.rs @@ -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>, invert_zoom: bool) -> Result<(), Error> { +/// Display the provided mesh in a window that processes input +pub fn display(mesh: Mesh>, invert_zoom: bool) -> Result<(), Error> { let event_loop = EventLoop::new(); let window = Window::new(&event_loop)?; let mut viewer = block_on(Viewer::new(&window))?; diff --git a/crates/fj-window/src/lib.rs b/crates/fj-window/src/lib.rs index 1b0d14de4..5b9f8b7a1 100644 --- a/crates/fj-window/src/lib.rs +++ b/crates/fj-window/src/lib.rs @@ -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 @@ -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}; diff --git a/crates/fj/src/handle_model.rs b/crates/fj/src/handle_model.rs index 5fca60f3e..93015a74c 100644 --- a/crates/fj/src/handle_model.rs +++ b/crates/fj/src/handle_model.rs @@ -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(())