@@ -17,7 +17,7 @@ function Core() {
1717 return (
1818 < mesh ref = { meshRef } >
1919 < icosahedronGeometry args = { [ 2.3 , 5 ] } />
20- < meshStandardMaterial
20+ < meshStandardMaterial
2121 color = "#eaeaeaff"
2222 metalness = { 0.9 }
2323 roughness = { 0.2 }
@@ -29,31 +29,31 @@ function Core() {
2929}
3030
3131// --- Dynamic Text Component ---
32- const Slogans = [ "Raw Potential, Forged." , "Ideas Into Impact." , "Where Builders Thrive." ] ;
32+ const Slogans = [ "Raw Potential, Forged." , "Ideas Into Impact." , "Where Builders Thrive." ] ;
3333
3434function AnimatedText ( ) {
35- const [ index , setIndex ] = useState ( 0 ) ;
36- useEffect ( ( ) => {
37- const interval = setInterval ( ( ) => {
38- setIndex ( ( prevIndex ) => ( prevIndex + 1 ) % Slogans . length ) ;
39- } , 4000 ) ; // Change text every 4 seconds
40- return ( ) => clearInterval ( interval ) ;
41- } , [ ] ) ;
42-
43- return (
44- < AnimatePresence mode = "wait" >
45- < motion . h1
46- key = { Slogans [ index ] }
47- initial = { { opacity : 0 , y : 20 } }
48- animate = { { opacity : 1 , y : 0 } }
49- exit = { { opacity : 0 , y : - 20 } }
50- transition = { { duration : 0.8 , ease : 'easeInOut' } }
51- className = "hero-title text-5xl md:text-7xl lg:text-8xl text-center"
52- >
53- { Slogans [ index ] }
54- </ motion . h1 >
55- </ AnimatePresence >
56- ) ;
35+ const [ index , setIndex ] = useState ( 0 ) ;
36+ useEffect ( ( ) => {
37+ const interval = setInterval ( ( ) => {
38+ setIndex ( ( prevIndex ) => ( prevIndex + 1 ) % Slogans . length ) ;
39+ } , 4000 ) ; // Change text every 4 seconds
40+ return ( ) => clearInterval ( interval ) ;
41+ } , [ ] ) ;
42+
43+ return (
44+ < AnimatePresence mode = "wait" >
45+ < motion . h1
46+ key = { Slogans [ index ] }
47+ initial = { { opacity : 0 , y : 20 } }
48+ animate = { { opacity : 1 , y : 0 } }
49+ exit = { { opacity : 0 , y : - 20 } }
50+ transition = { { duration : 0.8 , ease : 'easeInOut' } }
51+ className = "hero-title font-heading tracking-wider text-5xl md:text-7xl lg:text-8xl text-center"
52+ >
53+ { Slogans [ index ] }
54+ </ motion . h1 >
55+ </ AnimatePresence >
56+ ) ;
5757}
5858
5959
@@ -63,7 +63,7 @@ export default function Hero() {
6363 < section className = "relative h-screen w-full" >
6464 { /* 3D Canvas */ }
6565 < div className = "absolute top-0 left-0 w-full h-full z-0" >
66- < Canvas camera = { { position : [ 0 , 0 , 8 ] , fov : 45 } } >
66+ < Canvas camera = { { position : [ 0 , 0 , 8 ] , fov : 45 } } >
6767 < ambientLight intensity = { 0.2 } />
6868 < directionalLight position = { [ 3 , 5 , 2 ] } intensity = { 1.5 } />
6969 < pointLight position = { [ - 5 , - 5 , 5 ] } intensity = { 2 } color = "#EAEAEA" />
@@ -74,17 +74,17 @@ export default function Hero() {
7474 { /* UI Content */ }
7575 < div className = "relative z-10 h-full flex flex-col justify-center items-center p-4" >
7676 < AnimatedText />
77- < motion . p
78- initial = { { opacity : 0 } }
79- animate = { { opacity : 1 } }
80- transition = { { duration : 1 , delay : 1 } }
81- className = "max-w-2xl mx-auto text-base md:text-lg mt-6 text-center text-text-secondary"
77+ < motion . p
78+ initial = { { opacity : 0 } }
79+ animate = { { opacity : 1 } }
80+ transition = { { duration : 1 , delay : 1 } }
81+ className = "max-w-2xl mx-auto text-base md:text-lg mt-6 text-center text-text-secondary"
8282 >
8383 Enclope is where ambitious student talent meets real-world projects.
8484 </ motion . p >
8585 </ div >
8686
87-
87+
8888 </ section >
8989 ) ;
9090}
0 commit comments