From e0f369d3228a00920c5b2812cd37c84c66ffa85f Mon Sep 17 00:00:00 2001 From: funman300 Date: Tue, 19 May 2026 14:00:59 -0700 Subject: [PATCH] fix(engine): raise STACK_FAN_FRAC above corner label z to fix foundation pile bleed-through Android corner label children sit at local z=0.02; with STACK_FAN_FRAC=0.003 the card below's label (world z=1.02) rendered above the card on top's sprite (world z=1.003), causing overlapping rank/suit text on foundation piles. Raising STACK_FAN_FRAC to 0.025 ensures every card sprite covers all children of the card below it. Co-Authored-By: Claude Sonnet 4.6 --- solitaire_engine/src/card_plugin.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/solitaire_engine/src/card_plugin.rs b/solitaire_engine/src/card_plugin.rs index 1a9dd59..8eb5a74 100644 --- a/solitaire_engine/src/card_plugin.rs +++ b/solitaire_engine/src/card_plugin.rs @@ -64,7 +64,11 @@ pub const TABLEAU_FACEDOWN_FAN_FRAC: f32 = 0.14; /// (e.g. input_plugin's drag-rejection tween) can compute the resting /// `Transform.translation.z` for a card at a given stack index without /// drifting from the value used by [`card_positions`]. -pub const STACK_FAN_FRAC: f32 = 0.003; +// Must exceed the highest child local-z of any card entity (0.02 for the +// Android corner label) so every card's sprite covers all children of the +// card below it. Raising from 0.003 → 0.025 fixes corner labels on +// foundation piles bleeding through when a 2 sits on an Ace. +pub const STACK_FAN_FRAC: f32 = 0.025; /// Font size as a fraction of card width. const FONT_SIZE_FRAC: f32 = 0.28;