From 1802d049a93de8e7095328d16d775ee2aeaaa2cd Mon Sep 17 00:00:00 2001 From: JongMany Date: Tue, 9 Jul 2024 16:47:24 +0900 Subject: [PATCH] =?UTF-8?q?feature:=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20?= =?UTF-8?q?=EC=95=A0=EB=8B=88=EB=A9=94=EC=9D=B4=EC=85=98=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/src/pages/root/components/Contents.tsx | 12 +++-- .../root/components/content/MyProfile.tsx | 23 ++++++++ .../pages/root/components/content/Project.tsx | 53 ++++++++++++++----- fe/src/webGl/StarScene.ts | 4 +- 4 files changed, 72 insertions(+), 20 deletions(-) create mode 100644 fe/src/pages/root/components/content/MyProfile.tsx diff --git a/fe/src/pages/root/components/Contents.tsx b/fe/src/pages/root/components/Contents.tsx index af86215..ff46272 100644 --- a/fe/src/pages/root/components/Contents.tsx +++ b/fe/src/pages/root/components/Contents.tsx @@ -7,6 +7,7 @@ import { useScrollAnimation } from "@/pages/root/hooks/useScrollAnimation"; import { useMotionValueEvent, useScroll } from "framer-motion"; import { useRef } from "react"; import starPng from "@/assets/star.png"; +import MyProfile from "@/pages/root/components/content/MyProfile"; export default function Contents() { const ref = useRef(null); @@ -38,9 +39,14 @@ export default function Contents() {
+ {/* 홈 */} + {/* 프로필 */} + + + @@ -49,6 +55,7 @@ export default function Contents() { projectName="Project 1" projectDescription="This is project 1" techSkills={["React", "TypeScript", "Tailwind CSS"]} + animeDirection="LToR" /> @@ -60,14 +67,11 @@ export default function Contents() { projectName="Project 1" projectDescription="This is project 1" techSkills={["React", "TypeScript", "Tailwind CSS"]} + animeDirection="RToL" /> - -

My 3

-

Welcome to my website!

-

My 4

Welcome to my website!

diff --git a/fe/src/pages/root/components/content/MyProfile.tsx b/fe/src/pages/root/components/content/MyProfile.tsx new file mode 100644 index 0000000..9cdb346 --- /dev/null +++ b/fe/src/pages/root/components/content/MyProfile.tsx @@ -0,0 +1,23 @@ +import { useInView } from "framer-motion"; +import React, { useRef } from "react"; + +export default function MyProfile() { + const ref = useRef(null); + const isInView = useInView(ref, { margin: "10px" }); + + return ( +
+
+
+

안녕하세요

+
+
+ ); +} diff --git a/fe/src/pages/root/components/content/Project.tsx b/fe/src/pages/root/components/content/Project.tsx index 959cd2c..444da64 100644 --- a/fe/src/pages/root/components/content/Project.tsx +++ b/fe/src/pages/root/components/content/Project.tsx @@ -13,8 +13,6 @@ export default function Project({ const containerRef = useRef(null); const isInView = useInView(containerRef, {}); - console.log(isInView); - return (
{ + const containerRef = useRef(null); + const isInView = useInView(containerRef, {}); + return ( -
-

{projectName}

-

{projectDescription}

-

사용한 기술 스택

-
    - {techSkills.map((skill) => ( -
  • {skill}
  • - ))} -
+
+

{projectName}

+

{projectDescription}

+
+

사용한 기술 스택

+
    + {techSkills.map((skill, idx) => ( +
  • + {skill} +
  • + ))} +
+

더 자세히 보기

); }; +Project.ImageContainer = ImageContainer; +Project.Description = Description; diff --git a/fe/src/webGl/StarScene.ts b/fe/src/webGl/StarScene.ts index 00951ab..3ae94de 100644 --- a/fe/src/webGl/StarScene.ts +++ b/fe/src/webGl/StarScene.ts @@ -146,13 +146,13 @@ export class StarScene { const vertices = new Float32Array(particlesCount); for (let i = 0; i < particlesCount; i++) { - vertices[i] = (Math.random() - 0.5) * 1000; + vertices[i] = (Math.random() - 0.5) * 2000; } const starField = new Star(); this.scene.add(starField.star); - const stars = new Star(vertices, count, "blue"); + const stars = new Star(vertices, count, "purple"); this.backgroundStars.push(stars, starField);