Addressed a problem where changes in the game were not being reflected or displayed properly. This update aims to enhance the visibility of game elements and ensure that user interactions lead to observable changes in the gameplay experience.
[skip gpt_engineer]
Этот коммит содержится в:
gpt-engineer-app[bot] 2024-12-15 12:51:54 +00:00
родитель 23e32c1e18
Коммит dbd515b623

Просмотреть файл

@ -13,12 +13,12 @@ export const NetworkAnimation = ({ className = '' }: { className?: string }) =>
const containerRef = useRef<HTMLDivElement>(null); const containerRef = useRef<HTMLDivElement>(null);
// Generate nodes with different sizes and positions // Generate nodes with different sizes and positions
const nodes: Node[] = Array.from({ length: 12 }, (_, i) => ({ const nodes: Node[] = Array.from({ length: 15 }, (_, i) => ({
id: i, id: i,
x: 20 + Math.random() * 60, // Random position between 20-80% x: 20 + Math.random() * 60,
y: 20 + Math.random() * 60, y: 20 + Math.random() * 60,
size: 2 + Math.random() * 2, // Random size between 2-4 size: 3 + Math.random() * 3, // Larger nodes (3-6px)
delay: i * 0.1 // Staggered animation delay delay: i * 0.1
})); }));
// Create pairs of nodes for connections // Create pairs of nodes for connections
@ -27,7 +27,7 @@ export const NetworkAnimation = ({ className = '' }: { className?: string }) =>
id: `${node.id}-${otherNode.id}`, id: `${node.id}-${otherNode.id}`,
from: node, from: node,
to: otherNode, to: otherNode,
opacity: Math.random() * 0.3 + 0.1 // Random opacity between 0.1-0.4 opacity: Math.random() * 0.5 + 0.2 // Higher opacity (0.2-0.7)
})) }))
); );
@ -45,15 +45,16 @@ export const NetworkAnimation = ({ className = '' }: { className?: string }) =>
y1={`${from.y}%`} y1={`${from.y}%`}
x2={`${to.x}%`} x2={`${to.x}%`}
y2={`${to.y}%`} y2={`${to.y}%`}
stroke="rgba(255, 215, 0, 0.2)" stroke="rgba(255, 215, 0, 0.4)" // Brighter connections
strokeWidth="0.5" strokeWidth="1" // Thicker lines
initial={{ opacity: 0, pathLength: 0 }} initial={{ opacity: 0, pathLength: 0 }}
animate={{ animate={{
opacity: [0, opacity, opacity/2], opacity: [0, opacity, opacity/2],
pathLength: [0, 1, 1] pathLength: [0, 1, 1],
strokeWidth: [1, 2, 1] // Pulsing line thickness
}} }}
transition={{ transition={{
duration: 3, duration: 2,
repeat: Infinity, repeat: Infinity,
repeatType: "reverse", repeatType: "reverse",
ease: "easeInOut", ease: "easeInOut",
@ -76,25 +77,25 @@ export const NetworkAnimation = ({ className = '' }: { className?: string }) =>
}} }}
initial={{ scale: 0, opacity: 0 }} initial={{ scale: 0, opacity: 0 }}
animate={{ animate={{
scale: [0, 1, 1.2, 1], scale: [0, 1.2, 1],
opacity: [0, 1, 0.8, 1], opacity: [0, 1, 0.8],
x: [ x: [
-15,
15,
-10, -10,
10, 10,
-5,
5,
0 0
], ],
y: [ y: [
-5,
5,
-10, -10,
10, 10,
-15,
15,
0 0
] ]
}} }}
transition={{ transition={{
duration: 8, duration: 6,
repeat: Infinity, repeat: Infinity,
repeatType: "reverse", repeatType: "reverse",
ease: "easeInOut", ease: "easeInOut",
@ -103,13 +104,13 @@ export const NetworkAnimation = ({ className = '' }: { className?: string }) =>
> >
{/* Core node */} {/* Core node */}
<motion.div <motion.div
className="absolute w-full h-full rounded-full bg-yellow-500" className="absolute w-full h-full rounded-full bg-yellow-400" // Brighter yellow
animate={{ animate={{
scale: [1, 1.2, 1], scale: [1, 1.5, 1],
opacity: [0.8, 1, 0.8], opacity: [0.8, 1, 0.8],
}} }}
transition={{ transition={{
duration: 2, duration: 1.5,
repeat: Infinity, repeat: Infinity,
ease: "easeInOut", ease: "easeInOut",
}} }}
@ -117,34 +118,34 @@ export const NetworkAnimation = ({ className = '' }: { className?: string }) =>
{/* Outer glow */} {/* Outer glow */}
<motion.div <motion.div
className="absolute w-full h-full rounded-full bg-yellow-500/30" className="absolute w-full h-full rounded-full bg-yellow-400/40" // Brighter glow
animate={{ animate={{
scale: [1, 3, 1], scale: [1, 4, 1], // Larger glow
opacity: [0.3, 0, 0.3], opacity: [0.4, 0, 0.4],
}} }}
transition={{ transition={{
duration: 3, duration: 2,
repeat: Infinity, repeat: Infinity,
ease: "easeInOut", ease: "easeInOut",
delay: node.delay * 0.5, delay: node.delay * 0.5,
}} }}
/> />
{/* Particle effects */} {/* Enhanced particle effects */}
{Array.from({ length: 3 }).map((_, i) => ( {Array.from({ length: 4 }).map((_, i) => (
<motion.div <motion.div
key={i} key={i}
className="absolute w-1 h-1 rounded-full bg-yellow-500/20" className="absolute w-1.5 h-1.5 rounded-full bg-yellow-300/30" // Larger, brighter particles
animate={{ animate={{
x: [0, (i - 1) * 10], x: [0, (i - 1.5) * 15], // Wider spread
y: [0, (i - 1) * 10], y: [0, (i - 1.5) * 15],
scale: [0, 1, 0], scale: [0, 1.5, 0], // Larger scale
opacity: [0, 0.5, 0], opacity: [0, 0.7, 0], // Higher opacity
}} }}
transition={{ transition={{
duration: 2, duration: 1.5,
repeat: Infinity, repeat: Infinity,
delay: i * 0.3 + node.delay, delay: i * 0.2 + node.delay,
ease: "easeOut", ease: "easeOut",
}} }}
/> />