1.0.0-beta0.4 ā€¢ Published 3 months ago

vite-3 v1.0.0-beta0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

Vite-3 - Vite + ThreeJs App Generator

Vite-3-Logo

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:

  1. Project Name: The name of your project.
  2. Project Type: Choose between basic or shaders.
  3. Variant: Choose between JavaScript or TypeScript.
  4. 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

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.

Instagram LinkedIn GitHub

šŸ¤ 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.

šŸ™Œ Acknowledgements

  • Vite: The Build Tool for the Web.

  • Three.js: The core library for 3D rendering.