-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFeatures.jsx
More file actions
148 lines (137 loc) · 4.67 KB
/
Features.jsx
File metadata and controls
148 lines (137 loc) · 4.67 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
import React, { useState, useRef } from 'react';
import { TiLocationArrow } from 'react-icons/ti';
const BentoTilt = ({ children, className }) => {
const [transformStyle, setTransformStyle] = useState({});
const itemRef = useRef();
const handleMouseMove = (e) => {
if (!itemRef.current) return;
const { left, top, width, height } =
itemRef.current.getBoundingClientRect();
const relativeX = (e.clientX - left) / width;
const relativeY = (e.clientY - top) / height;
const tiltX = (relativeY - 0.5) * 5;
const tiltY = (relativeX - 0.5) * 5;
const newTransform = `perspective(700px) rotateX(${tiltX}deg) rotateY(${tiltY}deg) scale3d(0.98, 0.98, 0.98)`;
setTransformStyle(newTransform);
};
const handleMouseLeave = () => {
setTransformStyle('');
};
return (
<div
className={className}
ref={itemRef}
onMouseMove={handleMouseMove}
onMouseLeave={handleMouseLeave}
style={{ transform: transformStyle }}
>
{children}
</div>
);
};
const BentoCard = ({ src, title, description, isComingSoon }) => {
return (
<div className="relative size-full">
<video
src={src}
loop
muted
autoPlay
className="absolute left-0 top-0 size-full object-cover object-center"
/>
<div className="relative z-10 flex size-full flex-col justify-between p-5 text-blue-50">
<div>
<h1 className="bento-title special-font">{title}</h1>
{description && (
<p className="mt-3 max-w-64 text-xs md:text-base">
{description}
</p>
)}
</div>
</div>
</div>
);
};
const Features = () => {
return (
<section className="bg-black pb-52">
<div className="container mx-auto px-3 md:px-10">
<div className="px-5 py-32">
<p className="font-circular-web text-lg text-blue-50">
Into the Metagame Layer
</p>
<p className="font-circular-web text-lg max-w-md text-blue-50 opacity-50">
Immerse yourself in a rich and ever-expanding universe
where a vibrant array of products converge into an
interconnected overlay experience on your world.
</p>
</div>
<BentoTilt className="border-hsla relative mb-7 h-96 w-full overflow-hidden rounded-md md:h-[65vh]">
<BentoCard
src="videos/feature-1.mp4"
title={
<>
radi<b>n</b>t
</>
}
description="A cross-platform metagame app, turning your activities across Web2 and Web3 games into a rewarding adventure."
isComingSoon={true}
/>
</BentoTilt>
<div className="grid h-[135vh] grid-cols-2 grids-row-3 gap-7">
<BentoTilt className="bento-tilt_1 row-span-1 md:col-span-1 md:row-span-2">
<BentoCard
src="videos/feature-2.mp4"
title={
<>
zig<b>m</b>a
</>
}
description="An anime and gaming-inspired NFT collection - the IP primed for expansion"
/>
</BentoTilt>
<BentoTilt className="bento-tilt_1 row-span-1 ms-32 md:col-span-1 md:ms-0">
<BentoCard
src="videos/feature-3.mp4"
title={
<>
n<b>e</b>xus
</>
}
description="A gamified social hub, adding a new dimension of play to social interaction for Web3 communities."
/>
</BentoTilt>
<BentoTilt className="bento-tilt_1 me-14 md:col-span-1 md:me-0">
<BentoCard
src="videos/feature-4.mp4"
title={
<>
az<b>u</b>l
</>
}
description="A cross-world AI Agent - elevating your gameplay to be more fun and productive."
/>
</BentoTilt>
<BentoTilt className="bento-tilt_2">
<div className="flex size-full flex-col justify-between bg-violet-300 p-5">
<h1 className="bento-title special-font max-w-64 text-black">
M<b>o</b>re co<b>m</b>ing s<b>o</b>on!
</h1>
<TiLocationArrow className="m-5 scale-[5] self-end" />
</div>
</BentoTilt>
<BentoTilt className="bento-tilt_2">
<video
src="videos/feature-5.mp4"
loop
muted
autoPlay
className="size-full object-cover object-center"
></video>
</BentoTilt>
</div>
</div>
</section>
);
};
export default Features;