Merge pull request #1861 from hannobraun/window

Rename `window::run` to `display`
This commit is contained in:
Hanno Braun 2023-06-06 11:40:31 +02:00 committed by GitHub
commit 259ee38a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -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))?;

View File

@ -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};

View File

@ -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(())