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"
version = "0.22.0"
dependencies = [
"chrono",
"fj-math",
]
@ -1236,6 +1235,7 @@ name = "fj-viewer"
version = "0.22.0"
dependencies = [
"bytemuck",
"chrono",
"crossbeam-channel",
"egui",
"egui-wgpu",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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