-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCharacters.tsx
More file actions
71 lines (65 loc) · 1.95 KB
/
Copy pathCharacters.tsx
File metadata and controls
71 lines (65 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import Image from "next/image";
import { motion } from "framer-motion";
import waterAnteater from "@/assets/images/intro-water-anteater.svg";
import waterAnteaterFoam from "@/assets/images/intro-character-foam.svg";
import waterAnteaterShadow from "@/assets/images/intro-water-anteater-shadow.svg";
import beachBall from "@/assets/images/intro-beach-ball.svg";
import mainCharacter from "@/assets/images/intro-main-anteater.svg";
import styles from "./Characters.module.scss";
export default function Characters() {
return (
<div>
<motion.div
initial={{ translateX: 100, opacity: 0 }}
animate={{ translateX: 0, opacity: 1 }}
transition={{ duration: 0.5, delay: 0.6 }}
>
<Image
src={waterAnteater}
alt="Anteater floating in the water"
className={styles.character}
/>
</motion.div>
<motion.div
initial={{ translateX: 100, opacity: 0 }}
animate={{ translateX: 0, opacity: 1 }}
transition={{ duration: 0.5, delay: 0.6 }}
>
<Image
src={waterAnteaterShadow}
alt="Reflection of anteater in the water"
className={styles.characterShadow}
/>
</motion.div>
<motion.div
initial={{ translateX: 100, opacity: 0 }}
animate={{ translateX: 0, opacity: 1 }}
transition={{ duration: 0.5, delay: 0.6 }}
>
<Image
src={waterAnteaterFoam}
alt="Foam between anteater and the water"
className={styles.characterFoam}
/>
</motion.div>
<motion.div
initial={{ translateY: -100, opacity: 0 }}
animate={{ translateY: 0, opacity: 1 }}
transition={{ duration: 0.5, delay: 1 }}
>
<Image
src={mainCharacter}
alt="Anteater standing on the shore"
className={styles.mainCharacter}
/>
</motion.div>
<motion.div
initial={{ scale: 0.85, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{ duration: 0.5, delay: 0.8 }}
>
<Image src={beachBall} alt="Beach ball" className={styles.beachBall} />
</motion.div>
</div>
);
}