Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename window::run to display #1861

Merged
merged 4 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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