feat(view): add visual style previews

- preview render modes on hover without committing
- distinguish 2D and 3D wireframe fill and depth behavior

Refs #483
This commit is contained in:
Hakan Seven committed 2026-08-04 21:23:25 +03:00
1 parent 44d0c65ae9
commit b1d55c6a7e
49 files changed
+560 -51

No files matched your search

+9 -3
View File
@@ -82,8 +82,10 @@ impl Scene {
/// scene camera (tiled splits will append more later). `model_mode`
/// supplies its render mode (held on the tab, not the scene).
/// - **Paper layout**: one instance per content viewport entity
/// (`id > 1`, owned by the current layout block, switched on),
/// using each viewport's own camera and render mode.
/// (`id > 1`, owned by the current layout block, switched on), using each
/// viewport's own camera and render mode. `model_mode` temporarily
/// overrides the active viewport so the visual-style gallery can preview
/// on hover without modifying the document.
pub fn active_viewports(
&self,
canvas_w: f32,
@@ -182,7 +184,11 @@ impl Scene {
tile_idx: None,
screen_rect,
camera,
render_mode: vp.render_mode,
render_mode: if self.active_viewport == Some(h) {
model_mode
} else {
vp.render_mode
},
active: self.active_viewport == Some(h),
grid_on: vp.status.grid_on,
paper_sheet: false,