This project utilizes the Three.js library to create a dynamic 3D space scene with a rotating torus, directional light, and stars. The scene responds to user scrolling, adjusting the camera position based on the scroll offset. Additionally, the project includes responsive handling for window resizing.
-
Clone the repository:
git clone https://github.com/xnm-sdksdk/TorusAnimation.git
-
Rotating Torus: The main element of the scene is a torus that rotates on its axis.
-
Directional Light: A directional light source enhances the visibility and shading of the torus.
-
Starry Background: A multitude of stars are randomly distributed throughout the scene.
-
Dynamic Camera Movement: The camera position changes based on the user's scroll, creating a parallax effect.
-
Responsive Design: The scene adapts to window resizing, maintaining the correct aspect ratio.
🚀 Dear Community, 🚀
Contributions Welcome:
- If you have ideas for improvement or encounter issues, please open an issue.