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

Refactor fj-viewer into multiple crates. #584

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ members = [
"crates/fj-app",
"crates/fj-export",
"crates/fj-host",
"crates/fj-input",
"crates/fj-interop",
"crates/fj-kernel",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you modify the commit to not remove this? I realize you're adding it back in a later commit, but having it removed for a few commits could mess up any git bisect over that commit range.

"crates/fj-math",
"crates/fj-operations",
"crates/fj-viewer",
Expand Down
21 changes: 21 additions & 0 deletions crates/fj-input/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[package]
name = "fj-input"
version = "0.6.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = []
gfx = []
Comment on lines +8 to +10
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are those features about? I don't think they're used anywhere.


[dependencies]
winit = "0.26.1"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think fj-input needs to eventually be independent from winit, for the separation to make sense, but this is fine for a start.


[dependencies.fj-interop]
version = "0.6.0"
path = "../fj-interop"

[dependencies.fj-math]
version = "0.6.0"
path = "../fj-math"
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions crates/fj-viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ winit = "0.26.1"
version = "0.6.0"
path = "../fj-host"

[dependencies.fj-input]
version = "0.6.0"
path = "../fj-input"

[dependencies.fj-interop]
version = "0.6.0"
path = "../fj-interop"
Expand Down
1 change: 0 additions & 1 deletion crates/fj-viewer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@

pub mod camera;
pub mod graphics;
pub mod input;
pub mod run;
pub mod window;
2 changes: 1 addition & 1 deletion crates/fj-viewer/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use std::time::Instant;

use fj_host::Watcher;
use fj_input as input;
use fj_operations::shape_processor::ShapeProcessor;
use futures::executor::block_on;
use tracing::{trace, warn};
Expand All @@ -17,7 +18,6 @@ use winit::{
use crate::{
camera::Camera,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Camera is disappearing here, and added back in a later commit, which means this commit fails to compile. See other comments regarding that.

In addition, this kind of thing makes it slightly harder to review the pull request, as I always need to cross-reference against later commits, if I see something like this.

graphics::{self, DrawConfig, Renderer},
input,
window::Window,
};

Expand Down