Skip to content

Commit

Permalink
Fix wasm build
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Nov 12, 2024
1 parent 4b9f315 commit b3f6d28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion demos/web-editor/crate/Cargo.lock

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

17 changes: 5 additions & 12 deletions demos/web-editor/crate/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use fidget::{
context::{Context, Tree},
render::{BitRenderMode, RenderConfig},
shape::Bounds,
render::{BitRenderMode, Camera, ImageSize, RenderConfig, VoxelSize},
var::Var,
vm::{VmData, VmShape},
Error,
Expand Down Expand Up @@ -84,11 +83,8 @@ pub fn render_region_2d(
let center = corner.add_scalar(scale / 2.0);

let cfg = RenderConfig::<2> {
image_size: image_size / workers_per_side,
bounds: fidget::render::Camera::from_center_and_scale(
center,
scale / 2.0,
),
image_size: ImageSize::from((image_size / workers_per_side) as u32),
camera: Camera::from_center_and_scale(center, scale / 2.0),
..RenderConfig::default()
};

Expand Down Expand Up @@ -196,11 +192,8 @@ fn render_3d_inner(
let center = corner.add_scalar(scale / 2.0);

let cfg = RenderConfig::<3> {
image_size: image_size / workers_per_side,
bounds: Bounds {
center,
size: scale / 2.0,
},
image_size: VoxelSize::from((image_size / workers_per_side) as u32),
camera: Camera::from_center_and_scale(center, scale / 2.0),
..RenderConfig::default()
};

Expand Down

0 comments on commit b3f6d28

Please sign in to comment.