Skip to main content

brep_render/
lib.rs

1//! Rendering, picking, and sketch editing for native and WebAssembly hosts.
2//!
3//! [`scene`] stores named geometry, [`pipeline`] evaluates feature histories,
4//! and [`render`] draws into a host-provided texture view. Cameras, picking,
5//! sketch state, and display settings are shared across presentation targets.
6//!
7//! [`engine_state::EngineState`] is the viewer state every shell wraps (scene,
8//! camera, selection, picking, the editable feature history, sketch mode and
9//! widget overlays); [`runner`] is the submit/poll boundary that runs histories
10//! and mesh imports; [`pick`] resolves screen points to kernel names. The
11//! kernel crate is re-exported as `brep_render::brep_kernel`. On `wasm32` the
12//! `engine` module provides the wasm-bindgen canvas API. See the README for the
13//! layering and the headless and desktop binaries.
14
15// `RenderSettings::to_json` is one `json!` literal over every setting, and
16// `json_internal!` recurses once per key — the default 128 stops short of the
17// full settings object.
18#![recursion_limit = "512"]
19
20// Re-export the kernel crate so downstream shells (e.g. `brep-app`'s wasm
21// `WorkerRunner`) can name the run-boundary types the `runner::HistoryRunner`
22// trait exposes (`brep_kernel::HistoryRequest`, …) WITHOUT taking their own
23// direct path dependency — which would have to mirror this crate's kernel
24// feature split (`default-features = false` / native `parallel`) or feature
25// unification bites. One canonical instance, reached as `brep_render::brep_kernel`.
26pub use brep_kernel;
27
28pub mod assembly_status;
29pub mod cam_sim;
30pub mod camera;
31pub mod color;
32pub mod constraint_overlays;
33pub mod controls;
34pub mod engine_state;
35pub mod feature_dimensions;
36pub mod features;
37pub mod face_transform_help;
38pub mod formatting;
39mod geometry2d;
40pub mod geometry3d;
41pub mod history;
42mod json_support;
43pub mod metadata;
44pub mod pick;
45pub mod pipeline;
46pub mod render;
47pub mod run_trace;
48pub mod runner;
49pub mod scene;
50pub mod pmi_weld_symbol;
51pub mod sheets;
52pub mod sketch;
53pub mod sketch3d;
54pub mod style;
55pub mod thumbnail;
56pub mod visibility;
57pub mod view;
58pub mod widgets;
59
60// The wasm-bindgen browser API (attach/resize/events/camera/pick/scene-feed/
61// settings/world→screen) — the R3 seam the host UI programs against. wasm only;
62// its GPU wrapper needs a canvas/WebGPU context.
63#[cfg(target_arch = "wasm32")]
64pub mod engine;
65