Welcome to the 3D Torus Animation project! This project is a visually stunning and interactive 3D animation of a rotating torus, built using HTML, CSS, JavaScript, the Canvas API, and the GSAP (GreenSock Animation Platform) for smooth animations.
- 3D Rotating Torus: A sleek torus shape rotating continuously in 3D space.
- Responsive Design: The animation adjusts smoothly to different screen sizes.
- Smooth Animations: Implemented with GSAP for high-performance animations and buttery-smooth transitions.
- Canvas Rendering: Utilizes the HTML5 Canvas API to render the torus, providing a lightweight and flexible rendering solution.
- HTML: Provides the structure of the web page.
- CSS: Handles basic styling for the page, ensuring the canvas is properly displayed.
- JavaScript: Manages the logic behind the torus animation, including geometry and interactivity.
- Canvas API: Used to render the 3D torus directly in the browser.
- GSAP: Ensures smooth and optimized animations, making the torus rotate seamlessly.
- Canvas Setup: A
<canvas>
element is used to display the animation. - Torus Geometry: JavaScript is used to define the vertices and faces of the torus in 3D space.
- Rendering and Animation: The Canvas API and GSAP handle rendering and continuous rotation, giving the torus a dynamic and visually appealing effect.
-
Clone the repository:
git clone https://github.com/psathul073/3D-Torus-Animation.git
-
Open the
index.html
file in your web browser.
That's it! The rotating torus will automatically appear on the screen.
Feel free to tweak the animation parameters, such as speed, rotation axis, and color, by modifying the relevant JavaScript and GSAP settings. Experiment with different values to create unique variations of the torus.
3D-Torus-Animation/
├── index.html # Main HTML file
├── styles.css # CSS for styling
├── script.js # JavaScript for the 3D Torus and animation logic
└── assets/ # (Optional) Additional assets like images or fonts
- GSAP: For providing an easy-to-use and highly performant animation library.
- Canvas API: For rendering the 3D graphics directly in the browser.
This project is open-source and licensed under the MIT License.
Enjoy exploring and customizing the 3D Torus Animation! Feel free to contribute or open issues if you have any suggestions or run into problems.
Happy Coding! 🎉