Interactive 3D version of brodymcfarland's portfolio. Shoot the ball at objects to navigate.
Next.js 16 · React 19 · React Three Fiber 9 · drei 10 · cannon physics · Tailwind 4
npm install
npm run dev # http://localhost:3000
npm run build # production build
npm run assets # regenerate textures (see below)lib/portfolio.ts— all content (projects, skills, contact links, nav). Edit this to keep the 3D site in sync with the 2-D site. Every cannon body name the ball can hit maps to a URL intargets.lib/quality.ts— device tier detection (touch / small screen / low CPU or memory →low). Controls DPR, texture size, star count, point-grid density, sphere segments, reflections and post-processing.components/Scene.tsx— shared canvas: lights, physics world, room, ball, orbit controls, effects.components/Page.tsx+Hud.tsx— page shell with name/nav/help overlay and loading bar.pages/*— each page only lists the props it places in the room.
Source images live in assets-src/ (4K PBR set, screenshots, hero, LinkedIn logo); the folder is git-ignored and not served. Generated outputs in public/textures/ are committed, so a fresh clone works without it. npm run assets (scripts/generate-assets.mjs) writes optimised files into public/textures/:
skills/*.pngandcontact/*.pnglogo spheres generated fromsimple-iconsprojects/*.jpg512×768 cards — resized screenshots, or generated title cards for projects without one
To add a project screenshot, drop it in assets-src/project_screenshots/, add it to the screenshots map in the script, and add the project in lib/portfolio.ts.
Low tier: 1K textures, no reflections / post-processing, 24-segment spheres, 300 stars, 40×40 point grid, DPR capped at 1.5, physics solver at 5 iterations. Portrait widens the camera FOV. Touch help text replaces mouse help.
- "cat loaf" 3D model by Hiroyuki Kajiwara (hk), via poly.pizza — CC-BY 3.0.
- Tech logos from simple-icons.