Prerequisites
Before you begin, make sure you have the following installed:Node.js 18+
Download from nodejs.org. Run
node -v to verify your version.Git
Download from git-scm.com. Run
git --version to verify.Set up the project
Install dependencies
Install all required packages using your preferred package manager:This installs React Three Fiber, Drei, GSAP, Tailwind CSS, and all other dependencies listed in
package.json.Start the development server
Launch the Vite dev server:Vite will print a local URL, typically
http://localhost:5173.Customize the portfolio iframe
The monitor mesh in the bedroom scene embeds a personal portfolio website inside an<iframe>. The URL is set in src/models/Computer.jsx:
src/models/Computer.jsx
https://namith.vercel.app/ with the URL you want to display on the in-scene monitor.
The iframe loads lazily (
loading='lazy'). Content only fetches when the component mounts, not on initial page load.Project structure
Next steps
3D scene
Learn how the bedroom GLTF model is loaded and rendered.
Time of day
Understand how lighting adapts to the current time.
Interactions
Explore click-to-zoom, keyboard navigation, and responsive camera logic.