docs(engine): update card_plugin module comment for PNG-based rendering

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-04-29 01:24:45 +00:00
parent e22fcadb22
commit 08202f9351
+9 -10
View File
@@ -1,15 +1,14 @@
//! Procedural card rendering. //! PNG-based card rendering.
//! //!
//! Each card is a parent entity with a coloured body `Sprite` and a child //! Card entities are synced with [`GameStateResource`] on every
//! `Text2d` showing rank+suit. Entities are synced with `GameStateResource` //! [`StateChangedEvent`]: missing cards are spawned, present cards are
//! on every `StateChangedEvent`: missing cards are spawned, present cards //! repositioned/updated in place, and stale cards are despawned.
//! are repositioned/updated in place, and stale cards are despawned.
//! //!
//! Phase 3 uses ASCII rank letters ("A", "2"…"10", "J", "Q", "K") and ASCII //! When [`CardImageSet`] is available, each face-up card renders its own
//! suit letters ("C", "D", "H", "S") so rendering does not depend on the //! 120×168 px `Handle<Image>` chosen from the 52 per-card PNGs loaded from
//! bundled font carrying Unicode suit glyphs. When real card art lands in a //! `assets/cards/faces/{rank}_{suit}.png`. A solid-colour `Sprite` with a
//! later phase, this plugin is replaced — the `CardEntity` marker and the //! `Text2d` rank+suit overlay is used as a fallback when `CardImageSet` is
//! "sync on StateChangedEvent" contract stay the same. //! absent (e.g. in tests running under `MinimalPlugins`).
use std::collections::{HashMap, HashSet}; use std::collections::{HashMap, HashSet};