From ff2485eba981a6021d291d87811ced360cbdc4a9 Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Wed, 20 May 2026 06:15:44 +0300 Subject: [PATCH] fix(scene): bake selection colour into greek-LOD text fill The greek-LOD text path emits no `points` and only `fill_tris`; the face3d fill pipeline colours each triangle with `wire.color`. We were storing the entity's own colour there, so selecting a text and then zooming past the LOD boundary kept the wire.selected flag but the on-screen colour dropped back to the entity hue. Swap `wire.color` to `WireModel::SELECTED` when `selected` is set, the same way `lod_stub_wire` already does it. Follow-up to #19. Co-Authored-By: Claude Opus 4.7 --- src/scene/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/scene/mod.rs b/src/scene/mod.rs index 72dc02111..e4e957c59 100644 --- a/src/scene/mod.rs +++ b/src/scene/mod.rs @@ -5036,12 +5036,15 @@ fn tessellate_entity( aabb, )]; } - // Greek text renders as fill_tris only; hit_test's AABB - // fallback handles window / crossing selection. #19. + // Greek text renders via the face3d fill batch, which colours + // each tri with `wire.color`. Bake the selected colour in so + // a selected text stays highlighted across the LOD boundary. + // hit_test's AABB fallback handles window / crossing. #19. + let fill_color = if sel { WireModel::SELECTED } else { entity_color }; return vec![WireModel { name: h.value().to_string(), points: vec![], - color: entity_color, + color: fill_color, selected: sel, aci, pattern_length: 0.0,