A modern starter template for creating Three.js projects using TypeScript and Vite. This template is designed to streamline the setup process, so you can focus on developing your 3D applications.
- Three.js: Build stunning 3D applications.
- TypeScript: Write maintainable and type-safe code.
- Vite: Enjoy blazing-fast development and build tools.
- GLSL Support: Write and bundle shader code seamlessly using
vite-plugin-glslify
. - GLTF Loading: Easily load 3D models with
vite-plugin-gltf
. - GSAP Integration: Create smooth animations.
Ensure you have the following installed on your machine:
- Node.js (version 16 or higher)
- npm or yarn package manager
- Clone the repository:
git clone https://github.com/yourusername/three-starter.git
cd three-starter
- Install dependencies:
npm install
To start the development server:
npm run dev
The application will be available at http://localhost:5173.
To build the project for production:
npm run build
The output files will be available in the dist directory.
To preview the production build:
npm run preview
- three: Core 3D rendering library.
- gsap: Animation library for smooth transitions and effects.
- vite-plugin-glslify: GLSL shader support in Vite.
- vite-plugin-gltf: Simplified GLTF model loading.
- @types/three: TypeScript definitions for Three.js.
- typescript: TypeScript compiler.
- vite: Frontend development and build tool.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch: git checkout -b feature-name.
- Commit your changes: git commit -m 'Add feature'.
- Push to the branch: git push origin feature-name.
- Create a pull request.
This project is licensed under the MIT License.
Feel free to open issues or submit pull requests to enhance this template. Contributions are welcome!