From ed9463c3c296e3ef973cb852e0d66b773c24b481 Mon Sep 17 00:00:00 2001 From: Yun Chan Date: Thu, 20 Aug 2026 11:52:45 +0900 Subject: [PATCH] =?UTF-8?q?=ED=97=A4=EB=8D=94=20=EB=B0=B0=EA=B2=BD=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20+=20three.js=20=EB=A5=BC=20=EB=91=90=20?= =?UTF-8?q?=EA=B3=B3=EC=9C=BC=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 헤더에 배경이 왜 있냐는 지적에서 시작했다. site-header 자체는 배경이 없었고, 안쪽 유리가 불투명 판으로 폴백된 것이었다. prefers-reduced-transparency 가 참이면 (윈도우 투명 효과 끄기 등) --surface-raised 단색이 깔린다. 투명도를 줄여달라는 요청은 "불투명한 판을 깔아라"가 아니다. 배경에 가까운 톤으로 낮추고 형태는 테두리와 그림자가 유지한다. 떠 있는 헤더는 더 가깝게 맞췄다. three.js - 공용 부트스트랩을 src/lib/shader-plane.ts 로 추출했다. references/three.md 가 권하는 구조를 그대로 구현한 것이다. 지연 로드 · DPR 클램프 1.5 · 화면 밖이면 정지 · 실패 시 CSS 폴백 - 히어로: 광원 두 개가 흐르고 하나가 포인터를 느리게 따라온다 - 재료: 좌표를 노이즈로 밀어 유리 너머의 결을 만든다 - 두 셰이더가 같은 three 청크를 공유한다. 네트워크 요청 1건 --glow-2 를 토큰으로 승격해 셰이더의 하드코딩 색을 없앴다. --- apps/site/src/components/Hero.astro | 135 +++++--------------- apps/site/src/components/Materials.astro | 58 ++++++++- apps/site/src/lib/shader-plane.ts | 150 +++++++++++++++++++++++ apps/site/src/styles/base.css | 16 ++- apps/site/src/styles/tokens.css | 2 + 5 files changed, 247 insertions(+), 114 deletions(-) create mode 100644 apps/site/src/lib/shader-plane.ts diff --git a/apps/site/src/components/Hero.astro b/apps/site/src/components/Hero.astro index 993c430..695096c 100644 --- a/apps/site/src/components/Hero.astro +++ b/apps/site/src/components/Hero.astro @@ -89,7 +89,7 @@ const { c, ui } = Astro.props; radial-gradient(46vw 40vw at 22% 18%, color-mix(in oklab, var(--accent) 40%, transparent), transparent 66%), radial-gradient(40vw 38vw at 82% 30%, - color-mix(in oklab, #6E7BFF 32%, transparent), transparent 64%); + color-mix(in oklab, var(--glow-2) 32%, transparent), transparent 64%); filter: blur(28px); } .hero-canvas { opacity: 0; transition: opacity 1.2s var(--ease-soft); } @@ -156,128 +156,51 @@ const { c, ui } = Astro.props; diff --git a/apps/site/src/components/Materials.astro b/apps/site/src/components/Materials.astro index b744774..f5f2732 100644 --- a/apps/site/src/components/Materials.astro +++ b/apps/site/src/components/Materials.astro @@ -16,6 +16,8 @@ const { c } = Astro.props;
+ {/* GPU 가 만드는 재질. WebGL 이 없으면 위 그라디언트가 그대로 결과물이다 */} +