Add animations #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add card animations when playing the game. Add animations for adding mana, when creatures apply damage, when damage is applied to a player, etc.
Implemented game animations driven by state diffs, so they play consistently for every client without changing the backend protocol.
What was added
prefers-reduced-motion.Files
frontend/app/pages/games/[id].vue— animation triggers, template bindings, stylesfrontend/app/utils/gameAnimations.ts— snapshot diffing logicfrontend/test/gameAnimations.test.ts— coverage for entering cards, attacks, damage, life changes, and mana gainsVerification
npx tsx --test test/*.test.ts— 15 tests passed@vue/compiler-sfc.npm testscript requires Node 24; this environment has Node 20, so I ran the same test files throughtsx.Implementation is ready for review: #3