Move StatusReport to fj-viewer

Since more code has been moved out of the main loop into separate
threads, and communication has been replaced with channels,
`StatusReport` isn't as widely used anymore.
This commit is contained in:
Hanno Braun 2022-11-02 13:25:16 +01:00
parent 48b031e4f3
commit ebd655549f
9 changed files with 8 additions and 10 deletions

2
Cargo.lock generated
View File

@ -1177,7 +1177,6 @@ dependencies = [
name = "fj-interop" name = "fj-interop"
version = "0.22.0" version = "0.22.0"
dependencies = [ dependencies = [
"chrono",
"fj-math", "fj-math",
] ]
@ -1236,6 +1235,7 @@ name = "fj-viewer"
version = "0.22.0" version = "0.22.0"
dependencies = [ dependencies = [
"bytemuck", "bytemuck",
"chrono",
"crossbeam-channel", "crossbeam-channel",
"egui", "egui",
"egui-wgpu", "egui-wgpu",

View File

@ -11,5 +11,4 @@ keywords.workspace = true
categories.workspace = true categories.workspace = true
[dependencies] [dependencies]
chrono = "0.4.22"
fj-math.workspace = true fj-math.workspace = true

View File

@ -18,4 +18,3 @@ pub mod debug;
pub mod ext; pub mod ext;
pub mod mesh; pub mod mesh;
pub mod processed_shape; pub mod processed_shape;
pub mod status_report;

View File

@ -12,6 +12,7 @@ categories.workspace = true
[dependencies] [dependencies]
bytemuck = "1.12.2" bytemuck = "1.12.2"
chrono = "0.4.22"
crossbeam-channel = "0.5.6" crossbeam-channel = "0.5.6"
egui = "0.19.0" egui = "0.19.0"
egui-wgpu = "0.19.0" egui-wgpu = "0.19.0"

View File

@ -24,10 +24,9 @@ use crossbeam_channel::{Receiver, Sender};
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
use rfd::FileDialog; use rfd::FileDialog;
use fj_interop::status_report::StatusReport;
use fj_math::{Aabb, Scalar}; use fj_math::{Aabb, Scalar};
use crate::graphics::DrawConfig; use crate::{graphics::DrawConfig, StatusReport};
struct GuiState { struct GuiState {
has_model: bool, has_model: bool,

View File

@ -19,6 +19,7 @@ mod graphics;
mod gui; mod gui;
mod input; mod input;
mod screen; mod screen;
mod status_report;
mod viewer; mod viewer;
pub use self::{ pub use self::{
@ -27,5 +28,6 @@ pub use self::{
gui::Gui, gui::Gui,
input::{InputEvent, InputHandler}, input::{InputEvent, InputHandler},
screen::{NormalizedScreenPosition, Screen, ScreenSize}, screen::{NormalizedScreenPosition, Screen, ScreenSize},
status_report::StatusReport,
viewer::Viewer, viewer::Viewer,
}; };

View File

@ -1,8 +1,6 @@
use std::path::PathBuf; use std::path::PathBuf;
use fj_interop::{ use fj_interop::processed_shape::ProcessedShape;
processed_shape::ProcessedShape, status_report::StatusReport,
};
use fj_math::Aabb; use fj_math::Aabb;
use tracing::warn; use tracing::warn;
@ -11,6 +9,7 @@ use crossbeam_channel::{Receiver, Sender};
use crate::{ use crate::{
camera::FocusPoint, gui::Gui, Camera, DrawConfig, InputEvent, InputHandler, camera::FocusPoint, gui::Gui, Camera, DrawConfig, InputEvent, InputHandler,
NormalizedScreenPosition, Renderer, RendererInitError, Screen, ScreenSize, NormalizedScreenPosition, Renderer, RendererInitError, Screen, ScreenSize,
StatusReport,
}; };
/// The Fornjot model viewer /// The Fornjot model viewer

View File

@ -6,11 +6,10 @@
use std::{error, path::PathBuf}; use std::{error, path::PathBuf};
use fj_host::{Host, Model, ModelEvent, Parameters}; use fj_host::{Host, Model, ModelEvent, Parameters};
use fj_interop::status_report::StatusReport;
use fj_operations::shape_processor::ShapeProcessor; use fj_operations::shape_processor::ShapeProcessor;
use fj_viewer::{ use fj_viewer::{
InputEvent, NormalizedScreenPosition, RendererInitError, Screen, InputEvent, NormalizedScreenPosition, RendererInitError, Screen,
ScreenSize, Viewer, ScreenSize, StatusReport, Viewer,
}; };
use futures::executor::block_on; use futures::executor::block_on;
use tracing::trace; use tracing::trace;