diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index d874ab4bf..41a89b5ab 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -2571,7 +2571,7 @@ dependencies = [ [[package]] name = "kcl-lib" -version = "0.1.69" +version = "0.1.70" dependencies = [ "anyhow", "approx", @@ -2628,9 +2628,9 @@ dependencies = [ [[package]] name = "kittycad" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af3de9bb4b1441f198689a9f64a8163a518377e30b348a784680e738985b95eb" +checksum = "e1777b503442fa4666564cc3ab237d456df853a09648a4b2bb09622d25d021a5" dependencies = [ "anyhow", "async-trait", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 0b17a28f8..b6ce645f7 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -16,7 +16,7 @@ tauri-build = { version = "2.0.0-beta.18", features = [] } [dependencies] anyhow = "1" kcl-lib = { version = "0.1.53", path = "../src/wasm-lib/kcl" } -kittycad = "0.3.5" +kittycad = "0.3.7" log = "0.4.21" oauth2 = "4.4.2" serde_json = "1.0" diff --git a/src/wasm-lib/Cargo.lock b/src/wasm-lib/Cargo.lock index 5583fa3fd..c7307644a 100644 --- a/src/wasm-lib/Cargo.lock +++ b/src/wasm-lib/Cargo.lock @@ -1385,7 +1385,7 @@ dependencies = [ [[package]] name = "kcl-lib" -version = "0.1.69" +version = "0.1.70" dependencies = [ "anyhow", "approx", @@ -1453,7 +1453,7 @@ dependencies = [ [[package]] name = "kcl-test-server" -version = "0.1.1" +version = "0.1.2" dependencies = [ "anyhow", "hyper", @@ -1466,9 +1466,9 @@ dependencies = [ [[package]] name = "kittycad" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af3de9bb4b1441f198689a9f64a8163a518377e30b348a784680e738985b95eb" +checksum = "e1777b503442fa4666564cc3ab237d456df853a09648a4b2bb09622d25d021a5" dependencies = [ "anyhow", "async-trait", diff --git a/src/wasm-lib/Cargo.toml b/src/wasm-lib/Cargo.toml index 02d350970..63327e743 100644 --- a/src/wasm-lib/Cargo.toml +++ b/src/wasm-lib/Cargo.toml @@ -69,7 +69,7 @@ members = [ ] [workspace.dependencies] -kittycad = { version = "0.3.6", default-features = false, features = ["js", "requests"] } +kittycad = { version = "0.3.7", default-features = false, features = ["js", "requests"] } kittycad-modeling-session = "0.1.4" [[test]] diff --git a/src/wasm-lib/kcl-test-server/Cargo.toml b/src/wasm-lib/kcl-test-server/Cargo.toml index f1b90d209..45ee1ffb6 100644 --- a/src/wasm-lib/kcl-test-server/Cargo.toml +++ b/src/wasm-lib/kcl-test-server/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "kcl-test-server" description = "A test server for KCL" -version = "0.1.1" +version = "0.1.2" edition = "2021" license = "MIT" [dependencies] anyhow = "1.0.86" hyper = { version = "0.14.29", features = ["server"] } -kcl-lib = { version = "0.1.62", path = "../kcl" } +kcl-lib = { version = "0.1.70", path = "../kcl" } pico-args = "0.5.0" serde = { version = "1.0.203", features = ["derive"] } serde_json = "1.0.120" diff --git a/src/wasm-lib/kcl/Cargo.toml b/src/wasm-lib/kcl/Cargo.toml index 940aa9705..aed55d2ef 100644 --- a/src/wasm-lib/kcl/Cargo.toml +++ b/src/wasm-lib/kcl/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kcl-lib" description = "KittyCAD Language implementation and tools" -version = "0.1.69" +version = "0.1.70" edition = "2021" license = "MIT" repository = "https://github.com/KittyCAD/modeling-app" diff --git a/src/wasm-lib/kcl/src/executor.rs b/src/wasm-lib/kcl/src/executor.rs index 3e72bf3d4..3e2e852ca 100644 --- a/src/wasm-lib/kcl/src/executor.rs +++ b/src/wasm-lib/kcl/src/executor.rs @@ -1359,6 +1359,8 @@ pub struct ExecutorSettings { pub highlight_edges: bool, /// Whether or not Screen Space Ambient Occlusion (SSAO) is enabled. pub enable_ssao: bool, + // Show grid? + pub show_grid: bool, } impl Default for ExecutorSettings { @@ -1367,6 +1369,7 @@ impl Default for ExecutorSettings { units: Default::default(), highlight_edges: true, enable_ssao: false, + show_grid: false, } } } @@ -1377,6 +1380,7 @@ impl From for ExecutorSettings { units: config.settings.modeling.base_unit, highlight_edges: config.settings.modeling.highlight_edges.into(), enable_ssao: config.settings.modeling.enable_ssao.into(), + show_grid: config.settings.modeling.show_scale_grid, } } } @@ -1387,6 +1391,7 @@ impl From for ExecutorSet units: config.settings.modeling.base_unit, highlight_edges: config.settings.modeling.highlight_edges.into(), enable_ssao: config.settings.modeling.enable_ssao.into(), + show_grid: config.settings.modeling.show_scale_grid, } } } @@ -1397,6 +1402,7 @@ impl From for ExecutorSettings { units: modeling.base_unit, highlight_edges: modeling.highlight_edges.into(), enable_ssao: modeling.enable_ssao.into(), + show_grid: modeling.show_scale_grid, } } } @@ -1415,6 +1421,7 @@ impl ExecutorContext { } else { None }, + if settings.show_grid { Some(true) } else { None }, None, None, None, @@ -1478,6 +1485,7 @@ impl ExecutorContext { units, highlight_edges: true, enable_ssao: false, + show_grid: false, }, ) .await?; diff --git a/src/wasm-lib/tests/executor/main.rs b/src/wasm-lib/tests/executor/main.rs index 3845f441c..0f5ad0c8d 100644 --- a/src/wasm-lib/tests/executor/main.rs +++ b/src/wasm-lib/tests/executor/main.rs @@ -37,6 +37,7 @@ async fn new_context(units: UnitLength) -> Result { units, highlight_edges: true, enable_ssao: false, + show_grid: false, }, ) .await?;