1.1 KiB
1.1 KiB
Draft Cards Picker UI Update
Task
Update the DraftView to implement a 3D-flipping card preview sidebar (consistent with the Deck Builder) and ensure foil cards are rendered correctly in both the preview and the main selection grid.
Changes
- Modified
src/client/src/modules/draft/DraftView.tsx:- Imported
FoilOverlaycomponent. - Defined
normalizeCardhelper to standardise card object structure (handling images and finish). - Added
displayCardstate to persist card details during the flip animation. - Replaced the previous fade-in sidebar with the 3D perspective flip container from
DeckBuilderView. - Updated the card rendering loop in
activePackto usenormalizeCardand conditionally renderFoilOverlayand foil-specific styles (purple glow, badges).
- Imported
Outcome
- Sidebar: Now features a persistent 3D flip animation. When hovering a card, it flips to show the front; when not hovering, it shows the card back (
/images/back.jpg). - Foil Support: Start using
FoilOverlayfor both the main draft grid and the sidebar preview, providing visual consistency for premium cards.