This project is a Next.js-based website featuring a 3D scroll animation with a cloud station model. As users scroll through the page, they experience an immersive 3D environment with text blocks appearing on alternating sides.
- 3D scene with a cloud station model
- Smooth scroll-based animation
- Responsive design
- Text blocks that appear on alternating sides as you scroll
- Next.js
- React
- Three.js
- TypeScript
- Node version 18 or higher [https://nodejs.org/en]
- Visual Studio Code [https://code.visualstudio.com/download]
- Vercel if you want to deploy the project online [https://vercel.com/]
- Clone the repository: git clone https://github.com/your-username/3d-scroll-website.git
- Navigate to the project directory: cd 3d-scroll-website
- Install the dependencies: npm install
To run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
Scene.tsx: Manages the 3D scene using Three.jsTextBlock.tsx: Renders text blocks that appear as you scrollHeader.tsx: Displays the fixed header at the top of the pagescrollAnimation.ts: Handles the scroll-based animation logic
- To change the 3D model, replace the
cloud_station.glbfile in thepublicfolder and update the file path inScene.tsx. - Modify the text content by updating the
TextBlockcomponents inpages/index.tsx. - Adjust the animation behavior by editing the
scrollAnimation.tsfile.