|
1 | 1 | "use client"; |
2 | 2 |
|
3 | 3 | import React, { useEffect, useRef, useState } from "react"; |
4 | | -import { motion, AnimatePresence } from "framer-motion"; |
| 4 | +import { motion, AnimatePresence, Variants } from "framer-motion"; |
5 | 5 | import Image from "next/image"; |
6 | 6 | import Lenis from "@studio-freight/lenis"; |
7 | 7 | import { useMediaQuery } from "react-responsive"; |
@@ -62,14 +62,36 @@ const bounceAnimation = { |
62 | 62 | }, |
63 | 63 | }; |
64 | 64 |
|
65 | | -const backgroundVariants = { |
| 65 | +const backgroundVariants: Variants = { |
66 | 66 | initial: { |
67 | | - background: "linear-gradient(135deg, #2B3A67 0%, #1E2B4D 100%)", |
| 67 | + backgroundColor: "#1a1f2c", |
| 68 | + backgroundImage: "linear-gradient(135deg, #1a1f2c 0%, #111827 100%)", |
68 | 69 | }, |
69 | 70 | animate: { |
70 | | - background: "linear-gradient(135deg, #2B3A67 0%, #1E2B4D 100%)", |
| 71 | + backgroundImage: [ |
| 72 | + "linear-gradient(135deg, #1a1f2c 0%, #111827 100%)", |
| 73 | + "linear-gradient(135deg, #1a1f2c 20%, #4b5563 80%)", |
| 74 | + "linear-gradient(135deg, #111827 0%, #374151 100%)", |
| 75 | + "linear-gradient(135deg, #1a1f2c 0%, #111827 100%)", |
| 76 | + ], |
| 77 | + backgroundPosition: ["0% 0%", "50% 50%", "100% 100%", "0% 0%"], // 움직임 추가 |
71 | 78 | transition: { |
72 | | - duration: 20, |
| 79 | + duration: 10, |
| 80 | + ease: "easeInOut", |
| 81 | + repeat: Infinity, |
| 82 | + repeatType: "reverse" as const, |
| 83 | + }, |
| 84 | + }, |
| 85 | + wave: { |
| 86 | + backgroundImage: [ |
| 87 | + "linear-gradient(135deg, #1a1f2c 0%, #111827 100%)", |
| 88 | + "linear-gradient(135deg, #1a1f2c 50%, #374151 50%)", |
| 89 | + "linear-gradient(135deg, #1a1f2c 0%, #111827 100%)", |
| 90 | + ], |
| 91 | + backgroundSize: ["200% 200%", "100% 100%", "200% 200%"], // 크기 변화를 통한 파동 효과 |
| 92 | + transition: { |
| 93 | + duration: 5, |
| 94 | + ease: "easeInOut", |
73 | 95 | repeat: Infinity, |
74 | 96 | repeatType: "reverse" as const, |
75 | 97 | }, |
|
0 commit comments