Rebuild portfolio as interactive 3D corridor experience#67
Open
Mas-Hanafi wants to merge 2 commits into
Open
Conversation
Replaces the placeholder scaffold with a React Three Fiber portfolio for Imam Hanafi (Tourism Marketing Communication Specialist): an infinite corridor with 4 doors leading to Gallery/Studio/About/Contact rooms, styled with a procedurally-generated toon+outline "sketch" look (no external art assets, avoiding the copyright issue of the reference site's hand-drawn textures). Content is real, transcribed from the site owner's CV. Note: package-lock.json is not included in this commit (regenerate with `npm install` from package.json — the lockfile diff was too large to push via this channel). All other changed files across the 16-task implementation plan (see docs/superpowers/plans/) are included.
…t font Renders visible text (previously blank placeholders) using drei's Text component: door labels on corridor sign plates, career role/org on Gallery cards, AI tool names on Studio monitors, the profile name in About, and email/WhatsApp on the Contact paper. Font is Caveat (handwriting style, matching the sketch aesthetic), loaded directly from Google Fonts' CDN rather than vendored as a binary in the repo. Also fixes a real test regression: drei's Text does an async font fetch that has no server to resolve against inside @react-three/test-renderer's headless environment, which was aborting reconciliation for entire component subtrees (not just the Text node), zeroing out unrelated Mesh/Group count assertions in 5 previously-green tests. Fixed with a global vitest setup file that mocks drei's Text with a synchronous pass-through stand-in during tests only.
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.
Summary
Replaces the placeholder Next.js scaffold with a full 3D portfolio for Imam Hanafi (Tourism Marketing Communication Specialist), inspired architecturally by itomdev.com but rebuilt from scratch to avoid the reference site's copyrighted art assets:
docs/superpowers/plans/2026-07-04-itom-3d-portfolio-clone.md) with spec-compliance + code-quality review at every step.What changed
src/lib/corridor-math.ts— pure, fully-unit-tested scroll/door/camera mathsrc/components/canvas/materials/sketchMaterial.ts— procedural toon+outline material factoriessrc/context/SceneContext.tsx— room navigation statesrc/hooks/useInfiniteCamera.ts,useRoomCamera.ts,useSketchMaterial.ts— R3F camera/material hooks, all with proper GPU resource disposal on unmountsrc/components/canvas/{Door,Corridor,Experience}.tsx+rooms/{Gallery,Studio,About,Contact}Room.tsx— the 3D scenesrc/components/dom/HUD.tsx— 2D nav overlay (accessible:aria-current,aria-label)src/data/content.ts/src/types/content.ts— real CV content + typessrc/app/page.tsx,layout.tsx— wired up, metadata derived from the same content source as the UITwo bugs found and fixed during manual browser verification (Task 16)
Both were invisible to automated tests since no single component test exercised the full Canvas+camera composition:
useRoomCamerahook that snaps the camera to a room-viewing pose whenever a room becomes active. Also found and fixed two backface-culled planes (Gallery cards, Contact paper) that were only exposed once the camera fix made them visible.Explicitly out of scope (documented in the plan, not silent gaps)
<Text>content in roomsTest plan
npm test— 29/29 tests passnpm run typecheck— cleannpm run lint— 0 errors (1 pre-existing intentional warning: unusedlabelprop onDoor, reserved for future 3D text)npm run build— production build succeedsNote:
package-lock.jsonis not included in this PR's diff (regenerate withnpm install— the lockfile diff was too large to push through the available channel in this environment). New dependencies added:three,@react-three/fiber,@react-three/drei,gsap(runtime);vitest,jsdom,@vitejs/plugin-react,@react-three/test-renderer,@testing-library/react(dev).🤖 Generated with Claude Code