Extract fj-viewer from fj-app

This commit is contained in:
Hanno Braun 2022-04-13 14:33:44 +02:00
parent 12860e94e2
commit e5a4920716
35 changed files with 72 additions and 29 deletions

30
Cargo.lock generated
View File

@ -694,26 +694,17 @@ name = "fj-app"
version = "0.5.0"
dependencies = [
"anyhow",
"bytemuck",
"clap",
"figment",
"fj",
"fj-export",
"fj-host",
"fj-interop",
"fj-kernel",
"fj-math",
"fj-operations",
"futures",
"nalgebra",
"parry3d-f64",
"fj-viewer",
"serde",
"thiserror",
"tracing",
"tracing-subscriber",
"wgpu",
"wgpu_glyph",
"winit",
]
[[package]]
@ -786,6 +777,25 @@ dependencies = [
"parry3d-f64",
]
[[package]]
name = "fj-viewer"
version = "0.5.0"
dependencies = [
"bytemuck",
"fj-host",
"fj-interop",
"fj-math",
"fj-operations",
"futures",
"nalgebra",
"parry3d-f64",
"thiserror",
"tracing",
"wgpu",
"wgpu_glyph",
"winit",
]
[[package]]
name = "flate2"
version = "1.0.22"

View File

@ -9,6 +9,7 @@ members = [
"fj-kernel",
"fj-math",
"fj-operations",
"fj-viewer",
"models/cuboid",
"models/group",
@ -25,4 +26,5 @@ default-members = [
"fj-kernel",
"fj-math",
"fj-operations",
"fj-viewer",
]

View File

@ -13,15 +13,6 @@ categories = ["mathematics", "rendering"]
[dependencies]
anyhow = "1.0.56"
bytemuck = "1.9.1"
futures = "0.3.21"
nalgebra = "0.30.0"
parry3d-f64 = "0.8.0"
thiserror = "1.0.30"
tracing = "0.1.33"
wgpu = "0.12.0"
wgpu_glyph = "0.16.0"
winit = "0.26.1"
[dependencies.clap]
version = "3.1.8"
@ -43,10 +34,6 @@ path = "../fj-export"
version = "0.5.0"
path = "../fj-host"
[dependencies.fj-interop]
version = "0.5.0"
path = "../fj-interop"
[dependencies.fj-kernel]
version = "0.5.0"
path = "../fj-kernel"
@ -59,6 +46,10 @@ path = "../fj-math"
version = "0.5.0"
path = "../fj-operations"
[dependencies.fj-viewer]
version = "0.5.0"
path = "../fj-viewer"
[dependencies.serde]
version = "1.0.136"
features = ["derive"]

View File

@ -1,10 +1,5 @@
mod args;
mod camera;
mod config;
mod graphics;
mod input;
mod run;
mod window;
use std::path::PathBuf;
@ -12,10 +7,11 @@ use anyhow::anyhow;
use fj_export::export;
use fj_host::{Model, Parameters};
use fj_operations::shape_processor::ShapeProcessor;
use fj_viewer::run::run;
use tracing_subscriber::fmt::format;
use tracing_subscriber::EnvFilter;
use crate::{args::Args, config::Config, run::run};
use crate::{args::Args, config::Config};
fn main() -> anyhow::Result<()> {
// Respect `RUST_LOG`. If that's not defined or erroneous, log warnings and

39
fj-viewer/Cargo.toml Normal file
View File

@ -0,0 +1,39 @@
[package]
name = "fj-viewer"
version = "0.5.0"
edition = "2021"
description = "The world needs another CAD program."
readme = "../README.md"
repository = "https://github.com/hannobraun/fornjot"
license = "0BSD"
keywords = ["cad", "programmatic", "code-cad"]
categories = ["rendering"]
[dependencies]
bytemuck = "1.9.1"
futures = "0.3.21"
nalgebra = "0.30.0"
parry3d-f64 = "0.8.0"
thiserror = "1.0.30"
tracing = "0.1.33"
wgpu = "0.12.0"
wgpu_glyph = "0.16.0"
winit = "0.26.1"
[dependencies.fj-host]
version = "0.5.0"
path = "../fj-host"
[dependencies.fj-interop]
version = "0.5.0"
path = "../fj-interop"
[dependencies.fj-math]
version = "0.5.0"
path = "../fj-math"
[dependencies.fj-operations]
version = "0.5.0"
path = "../fj-operations"

5
fj-viewer/src/lib.rs Normal file
View File

@ -0,0 +1,5 @@
pub mod camera;
pub mod graphics;
pub mod input;
pub mod run;
pub mod window;