Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,19 @@ video::-webkit-media-controls-start-playback-button {

@keyframes scrolling-left1 {
0% {
transform: translateX(200%);
transform: translateX(180vw);
}
100% {
transform: translateX(-200%);
transform: translateX(-180vw);
}
}
}
@keyframes scrolling-left2 {
0% {
transform: translateX(100%);
transform: translateX(120vw);
opacity: 100%;
}
100% {
transform: translateX(-300%);
transform: translateX(-240vw);
opacity: 100%;
}
}
4 changes: 2 additions & 2 deletions src/common/StarContainer/StarContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ const StarContainer: React.FC<Readonly<StarContainerProps>> = ({
}, []);

const updateStarsByProximity = useCallback(
({ x, y }: Position) => {
({ x, y, pageY }: PointerEvent) => {
pointerPositionRef.current = { x, y };

if (!starsRef.current) {
return;
}

starsRef.current.forEach((star) => {
const distance = Math.sqrt(Math.pow(star.x - x, 2) + Math.pow(star.y - y, 2));
const distance = Math.sqrt(Math.pow(star.x - x, 2) + Math.pow(star.y - y - pageY / 9, 2));
const scale = scaleMapperRef.current!(Math.min(distance, vminRef.current! * proximityRatio));
const alpha = alphaMapperRef.current!(Math.min(distance, vminRef.current! * proximityRatio));

Expand Down
9 changes: 7 additions & 2 deletions src/features/Projects/ProjectCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from 'next/image';
import React from 'react';
import React, { useEffect, useRef, useState } from 'react';

import projectsContent from '@/content/projects.json';
import { cn } from '@/utils/classNames';
Expand Down Expand Up @@ -48,14 +48,19 @@ const ProjectCard: React.FC<ProjectCardProps> = ({ name, image, background, xHan
&nbsp;&nbsp;&nbsp;{name}
</h1>
<h1
id='1'
className={cn(
'inline-block',
'h1 mix-blend-soft-light mb-6 text-[55px] leading-[44px]',
'md:text-[100px] md:leading-[86px]',
'lg:text-[170px] lg:leading-[166px] lg:h-[320px]',
'2xl:text-[257px] 2xl:leading-[214px] 2xl:h-[428px]',
'opacity-0',
)}
style={{ animation: 'scrolling-left2 20s linear infinite', animationDelay: '10s' }}
style={{
animation: 'scrolling-left2 20s linear infinite',
animationDelay: '7s',
}}
>
&nbsp;&nbsp;&nbsp;{name}
</h1>
Expand Down
36 changes: 19 additions & 17 deletions src/features/Projects/ProjectSwiper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,25 @@ const ProjectSwiper = () => {
effect='fade'
rewind
>
{projectsContent.PROJECTS.map(({ NAME, IMAGE, BACKGROUND, XHANDLE, YEAR, CLIENT, TAGS, XURL }) => (
<SwiperSlide
key={NAME}
className='!w-screen'
>
<ProjectCard
name={NAME}
image={IMAGE}
background={BACKGROUND}
xHandle={XHANDLE}
year={YEAR}
client={CLIENT}
tags={TAGS}
xUrl={XURL}
/>
</SwiperSlide>
))}
{projectsContent.PROJECTS.map(({ NAME, IMAGE, BACKGROUND, XHANDLE, YEAR, CLIENT, TAGS, XURL }) => {
return (
<SwiperSlide
key={NAME}
className='!w-screen'
>
<ProjectCard
name={NAME}
image={IMAGE}
background={BACKGROUND}
xHandle={XHANDLE}
year={YEAR}
client={CLIENT}
tags={TAGS}
xUrl={XURL}
/>
</SwiperSlide>
);
})}
</Swiper>
</>
);
Expand Down