feat(home): 스크롤이 아이의 개월 수가 되는 여섯 해 홈과 3D 동네 - #10
Merged
Merged
Conversation
홈의 스크롤 구간과 /benefits · /facilities · /data 가 같은 문장(자격 판정 세 갈래, 알리지 않는 경우, 아는 것/모르는 것)을 보여 주게 된다. 한쪽만 고쳐 두 페이지가 다른 말을 하지 않도록 src/content/facts.ts 로 옮긴다. 수치는 자동 갱신 스크립트가 고치는 figures.ts 에 그대로 둔다.
- 스크롤 진행 = 0→72개월. 구간 머리를 닻으로 삼아 도장의 개월 수와 장면이 정확히 맞는다 - three.js 동네: 계절(4월생 가정), 아이의 성장, 그 시기에 드나드는 건물로 가는 카메라, 알림 표식 - 동작 줄이기 · WebGL2 미지원이면 three.js 를 import 하기 전에 정적 배경으로 대체 - 구간 10개는 전부 서버 컴포넌트. 문구·수치는 기존 페이지와 앱 기능에 근거한 것만 쓴다 - 벽/옥상 두 재질로 그려 드로우콜 381 → 215(데스크톱)
WebGL2 가 있어도 SwiftShader · llvmpipe 처럼 CPU 로 흉내 내는 렌더러에서는 장면이 초당 몇 프레임이라 메인 스레드를 잡아먹고 스크롤이 끊긴다. CI 의 헤드리스 Chrome 에서 홈 로드가 60초를 넘겨 화면 검증이 실패한 것도 이 때문이다. three.js 를 import 하기 전에 렌더러 이름으로 판정해 정적 배경을 띄우고, 확인용으로 ?town=force 를 둔다.
Contributor
Author
|
첫 CI 가 화면 검증에서 실패했습니다(홈 로드 60초 초과). GPU 없는 CI 의 헤드리스 Chrome 이 SwiftShader 로 3D 를 돌리며 메인 스레드를 잡아먹었기 때문입니다. 로컬에서는 OS 의 동작 줄이기 설정 때문에 3D 가 아예 뜨지 않아 통과했던 것이라 놓쳤습니다. 실사용자에게도 같은 문제라(GPU 가속 없는 PC) 소프트웨어 렌더러를 감지하면 three.js 를 받기 전에 정적 배경으로 대체하도록 고쳤습니다. 확인용 |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇을
홈을 JellySafe 소개 사이트(스크롤 = 하루)의 구조를 빌려 한 페이지 스크롤 이야기로 바꿉니다. 스크롤 진행이 아이의 개월 수(0 → 72)이고, 뒤에 깔린 3D 동네가 그 값 하나로 바뀝니다.
상세 페이지 4개(/benefits · /facilities · /data · /trust)와 육아수첩 디자인 토큰은 그대로입니다. 홈과 상세 페이지가 함께 인용하는 문구는
src/content/facts.ts로 모았습니다.판단
확인
npm run typecheck·npx eslint src scripts·npm run buildscripts/verify-pages.mjs— 5개 페이지 × 390/768/1440, 가로 넘침 · 접근성 통과carecodeTown.stats()로 fps 확인 — 소프트웨어 렌더러 수치는 의미가 없어 비워 둡니다홈 첫 로드 JS 108 kB. three.js 는 지연 로드 청크입니다.