From 1ae0567b9f90c59fa8e3e6096f074e1003ac2054 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 14:44:43 +0000 Subject: [PATCH] Fix memes animation width usage Updated the memes animation component to utilize the full width and area available, improving its layout compared to the current implementation of the community animation. [skip gpt_engineer] --- .../game/animations/CommunityAnimation.tsx | 134 ++++++++++-------- 1 file changed, 75 insertions(+), 59 deletions(-) diff --git a/src/components/game/animations/CommunityAnimation.tsx b/src/components/game/animations/CommunityAnimation.tsx index 794b31e..3efbe2a 100644 --- a/src/components/game/animations/CommunityAnimation.tsx +++ b/src/components/game/animations/CommunityAnimation.tsx @@ -2,78 +2,94 @@ import React from 'react'; import { motion } from 'framer-motion'; export const CommunityAnimation = ({ className = '' }: { className?: string }) => { - // Create multiple community groups with members const groups = Array.from({ length: 3 }, (_, i) => ({ x: 25 + i * 25, // Spread groups evenly (25%, 50%, 75%) y: 50, // Center vertically members: Array.from({ length: 8 }, (_, j) => ({ id: i * 8 + j, - initialX: Math.random() * 80 + 10, // Keep within 10-90% bounds - initialY: Math.random() * 80 + 10, // Keep within 10-90% bounds + initialX: Math.random() * 80 + 10, + initialY: Math.random() * 80 + 10, })) })); return (
- {groups.map((group, groupIndex) => ( - - {/* Individual members that will converge into groups */} - {group.members.map((member) => ( - - ))} - - {/* Community boundary circles */} - + {[...Array(20)].map((_, i) => ( +
- - ))} + ))} +
+ + {/* Container for community groups with explicit positioning context */} +
+ {groups.map((group, groupIndex) => ( + + {group.members.map((member) => ( + + ))} + + + + ))} +
); }; \ No newline at end of file