mirror of
https://github.com/hannobraun/Fornjot
synced 2025-03-01 10:35:54 +00:00
Merge pull request #1861 from hannobraun/window
Rename `window::run` to `display`
This commit is contained in:
commit
259ee38a14
@ -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))?;
|
@ -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};
|
||||
|
@ -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(())
|
||||
|
Loading…
Reference in New Issue
Block a user