This project is a simple web application that showcases a 3D ball using the Three.js library. The ball can be interactively rotated by clicking and holding the mouse. The project also demonstrates the use of GSAP (GreenSock Animation Platform) for timeline-based animations and OrbitControls for camera manipulation.
You can try the live demo of the project by visiting the following link:
Demo - Link
- 3D Ball rendering using Three.js.
- Interactivity: Click and hold the mouse to rotate the ball.
- Smooth animations with GSAP (GreenSock Animation Platform).
- Camera manipulation with OrbitControls.
-
Clone the repository:
https://github.com/TechTronixx/3D-Ball-3js
-
Navigate to the project directory:
cd 3d-ball-app
-
Install dependencies using npm or yarn:
npm install
or
yarn
-
Start the development server with Vite:
npm run dev
or
yarn dev
-
Open your web browser and visit the local development URL provided by Vite. Typically, it will be something like
http://localhost:3000/
.
Now you should be able to see and interact with the 3D ball application locally using Vite's development server.
The project uses the following technologies:
- Three.js - A popular JavaScript 3D library for rendering 3D objects in the browser.
- GSAP (GreenSock Animation Platform) - A powerful animation library for smooth and precise animations.
- Vite - A fast and lightweight development server.
- OrbitControls - A popular Three.js library for camera manipulation.
The 3D ball model used in this project is from the Three.js documentation: Three.js - SphereGeometry