refactor(engine): ambiguity burn-down batch 3 — board paint chain, 171 → 47
Test / test (pull_request) Failing after 17m32s
Test / test (pull_request) Failing after 17m32s
The Sprite/Transform cluster (112 pairs) was every board painter racing every other one. Two structural moves: - BoardVisuals set (card_plugin): all card/marker painters run as ONE deterministic chain in data-flow order — layout refinement → card authority (sync_cards_on_change) → flip anims → shadows → highlights → stock indicators → resize snapping → corner labels — with LayoutSystem::UpdateOnResize ordered before the whole set and the table plugin's marker painters chained after it. Paint order is now identical every frame instead of scheduler-dependent. - UiTextFx set (ui_theme): chrome text effects (score pulse/floater, streak flourish, modal enter, focus-ring pulse) animate Transform on UI entities only; they are declared ambiguous with BoardVisuals and with each other — the entity domains are disjoint by construction. All chain members are cheap and change-gated; sequential execution is not a measurable cost for a card game. Existing ordering constraints (fan-frac before sync, shadows after sync, snap after collect) are preserved inside the chain. Baseline ratchets 171 → 47. Remaining: long tail of small subjects (input, event writers, AutoCompleteState, HudVisibility). Refs #143 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -698,3 +698,12 @@ mod tests {
|
||||
assert_eq!(scaled_duration(0.18, AnimSpeed::Instant), 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
/// System set for text/UI visual effects that animate `Transform`/`Sprite`
|
||||
/// on chrome entities (HUD score pulse, streak flourish, modal enter, focus
|
||||
/// ring). These never touch board entities, so members are declared
|
||||
/// `.ambiguous_with(BoardVisuals)` and `.ambiguous_with(UiTextFx)` — the
|
||||
/// entity domains are disjoint by construction and relative order within a
|
||||
/// frame is invisible (#143).
|
||||
#[derive(bevy::ecs::schedule::SystemSet, Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct UiTextFx;
|
||||
|
||||
Reference in New Issue
Block a user