Skip to content

threejs-cli is a command-line tool designed to help developers quickly scaffold Three.js projects with support for multiple frameworks, including Vanilla Three.js, TresJS (Vue + Three.js), and React Three Fiber (React + Three.js).

Notifications You must be signed in to change notification settings

indulgeback/threejs-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Three.js CLI Scaffold Tool

中文

threejs-cli is a command-line tool designed to help developers quickly scaffold Three.js projects with support for multiple frameworks, including Vanilla Three.js, TresJS (Vue + Three.js), and React Three Fiber (React + Three.js). Whether you're a beginner or an experienced developer, this tool allows you to focus on creativity and development without spending time on tedious project setup.

Features

  • Supports multiple frameworks:
    • Vanilla Three.js
    • TresJS (Vue + Three.js)
    • React Three Fiber (React + Three.js)
  • One-command project generation.
  • Automatically installs dependencies.
  • Modern development experience based on Vite.
  • Cross-platform support (Windows, macOS, Linux).

Installation

Install threejs-cli globally:

npm install -g threejs-cli

Usage

Run the CLI tool:

create-threejs

Select a project name:

Select a project name: my-project

Select a framework:

? Select a framework: (Use arrow keys)
❯ Vanilla (原生 Three.js)
TresJS (Vue + Three.js)
React Three Fiber (React + Three.js)

Navigate to the project directory and start the development server:

cd my-project
npm install
npm run dev

Example

Create a TresJS-based project

create-threejs

Select a project name

Select a project name: my-tresjs-project

Select a framework

? Select a framework: (Use arrow keys)
❯ TresJS (Vue + Three.js)
Vanilla (原生 Three.js)
React Three Fiber (React + Three.js)

Navigate to the project directory and start the development server

cd my-tresjs-project
npm install
npm run dev

Contributing

We welcome contributions! Please submit issues or pull requests to improve threejs-cli.

License

threejs-cli is open-source under the MIT License.

About

threejs-cli is a command-line tool designed to help developers quickly scaffold Three.js projects with support for multiple frameworks, including Vanilla Three.js, TresJS (Vue + Three.js), and React Three Fiber (React + Three.js).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published