From 0064ce41178d69c7e26b6fc463168a678411f55a Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:04:14 +0000 Subject: [PATCH] Revamp Meme Animation Updated the meme animation to better communicate the underlying idea of the stratagem. Adjustments made to enhance clarity and effectiveness in conveying the intended message. [skip gpt_engineer] --- .../game/animations/MemeAnimation.tsx | 154 +++++++++++++----- 1 file changed, 113 insertions(+), 41 deletions(-) diff --git a/src/components/game/animations/MemeAnimation.tsx b/src/components/game/animations/MemeAnimation.tsx index ee14126..1dfd2d7 100644 --- a/src/components/game/animations/MemeAnimation.tsx +++ b/src/components/game/animations/MemeAnimation.tsx @@ -6,67 +6,139 @@ interface MemeSymbol { symbol: string; x: number; y: number; - rotation: number; scale: number; + delay: number; } export const MemeAnimation = ({ className = '' }: { className?: string }) => { - const createWave = (waveIndex: number) => { - return Array.from({ length: 6 }, (_, i) => { - const symbols = ['😂', '🤔', '💭', '🎯', '🔥', '💯', '👀', '🙌', '✨', '💪']; - const x = 5 + (i * (90 / 5)); - return { - id: waveIndex * 6 + i, - symbol: symbols[Math.floor(Math.random() * symbols.length)], - x, - y: 120 + (waveIndex * 60), - rotation: -10 + Math.random() * 20, - scale: 0.8 + Math.random() * 0.4, - }; - }); + // Create a grid of starting positions + const createMemeWave = () => { + const memes: MemeSymbol[] = []; + const symbols = ['💡', '🎯', '📱', '🔄', '🌐', '💫']; + + // Create a 3x3 grid of meme symbols + for (let row = 0; row < 3; row++) { + for (let col = 0; col < 3; col++) { + const baseSymbol = symbols[Math.floor(Math.random() * symbols.length)]; + memes.push({ + id: row * 3 + col, + symbol: baseSymbol, + x: 20 + (col * 30), // Spread across horizontally + y: 20 + (row * 30), // Spread across vertically + scale: 0.8 + Math.random() * 0.4, + delay: (row * 3 + col) * 0.15 // Stagger the animations + }); + } + } + return memes; }; - const memeSymbols: MemeSymbol[] = [ - ...createWave(0), - ...createWave(1), - ...createWave(2), - ...createWave(3), - ]; + const memeSymbols = createMemeWave(); return (