From 90bcbd7129022b7a90cf1226c8ee4c5a0f1fe02e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 01:52:32 -0800 Subject: [PATCH] 3D: a wireframe effect's check casts no shadow In wireframe mode the effect draws no shadow, so the command check builds no shadow from its solids either: with Shadows on, Rotate builds no plane for it, and Extrude & Bevel and Inflate build each solid once. --- crates/effects/src/solids/tests_shadow.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/effects/src/solids/tests_shadow.rs b/crates/effects/src/solids/tests_shadow.rs index 47c5ac9261..6ec127ccbd 100644 --- a/crates/effects/src/solids/tests_shadow.rs +++ b/crates/effects/src/solids/tests_shadow.rs @@ -361,3 +361,16 @@ fn the_check_accepts_the_shadowed_objects_that_draw() { assert_eq!(SOLIDS_BUILT.with(std::cell::Cell::get) - start, planes, "Rotate, a stroke at {stroke}"); } } + +/// In wireframe mode no shadow is drawn, so the check casts none: with Shadows on, Rotate builds no +/// plane for a shadow, and Extrude & Bevel and Inflate build each solid once, as with the shadow off. +#[test] +fn the_check_casts_no_shadow_in_wireframe_mode() { + let n = stroked_square(1, 0.0, 1.0); + let wire = json!({"shadow": true, "render": {"mode": "wireframe"}}); + for (id, solids) in [(ROTATE, 0), (EXTRUDE, 2), (INFLATE, 2)] { + let start = SOLIDS_BUILT.with(std::cell::Cell::get); + assert_eq!(validate_solid(&n, id, &wire), Ok(()), "{id}"); + assert_eq!(SOLIDS_BUILT.with(std::cell::Cell::get) - start, solids, "{id}"); + } +}