vite-3
v1.0.0-beta0.4
Published
CLI tool for creating Three.js Vite projects with GLSL support
Downloads
211
Maintainers
Readme
Vite-3 - Vite + ThreeJs App Generator
Vite-3 is a project generator for creating Vite-based Three.js applications. It provides boilerplate code for both JavaScript and TypeScript projects, with options for Basic or Shader-based templates. Additionally, Tailwind CSS can be integrated for styling.
✨ Features
- Supports JavaScript and TypeScript variants.
- Provides two project types:
- Basic: Simple Three.js project with basic geometry and materials.
- Shaders: Three.js project using custom GLSL shaders.
- Optional integration with Tailwind CSS.
- Automatically sets up Vite for development and bundling.
- Pre-configured with Vite GLSL plugin for shader support.
📦 Installation
To install Vite-3 globally:
npm install -g vite-3
🛠️ Usage
Run the following command to scaffold a new Vite Three.js project:
vite-3 OR vite3
You will be prompted to provide the following details:
- Project Name: The name of your project.
- Project Type: Choose between
basic
orshaders
. - Variant: Choose between
JavaScript
orTypeScript
. - Tailwind CSS: Option to include Tailwind CSS for styling.
After answering the prompts, the project structure will be created, and all dependencies will be installed.
📑 Project Structure
The generated project will have the following structure:
project-name/
│
├── index.html # Main HTML file
├── package.json # Project metadata and scripts
├── vite.config.js # Vite configuration file
├── src/
│ ├── main.js|ts # Entry point of the Three.js project
│ ├── styles.css # Main styles (includes Tailwind if selected)
│ └── shaders/ # (For shader projects) GLSL files
├── tsconfig.json # (For TypeScript projects) TypeScript configuration
└── node_modules/ # Project dependencies
📜 Available Scripts
Inside the project directory, you can run:
npm run dev
: Starts the development server with Vite.npm run build
: Builds the project for production.
For TypeScript projects, the build command will first compile the TypeScript files.
🌟 Meet the Visionary Behind Shader3
In the heart of the dynamic world of web development, the creator of Shader is making waves with their unique visions and unwavering determination.
🎮 Aayush Chouhan - @aayushchouhan24
Aayush Chouhan, a tech lover and gaming enthusiast, embarked on a journey through cyberspace. From freelancing to diving into web and Android development, he honed his skills in programming languages. Joining Sheryians, he embraced Three.js, immersing himself in the captivating realm of 3D graphics, marking an exciting milestone in his career.
🤝 Contributing
We welcome contributions! If you have ideas for new features, bug fixes, or improvements, feel free to open an issue or submit a pull request on our GitHub repository.
📄 License
Vite-3
is licensed under the MIT License. For more information, refer to the LICENSE file.