Create a new React Three project using the following command:
npm create @react-three
[name]
- Optional name for your application. If not provided, you'll be prompted to enter one.
Option | Description |
---|---|
--url <url> |
Specify a custom URL to fetch create options from |
--js |
Use JavaScript instead of TypeScript |
--ts |
Use TypeScript (default) |
--drei |
Add @react-three/drei for useful helpers and abstractions |
--handle |
Add @react-three/handle for event handling |
--leva |
Add leva for creating controls and panels |
--postprocessing |
Add @react-three/postprocessing for post-processing effects |
--rapier |
Add @react-three/rapier for physics |
--xr |
Add @react-three/xr for VR/AR support |
--uikit |
Add @react-three/uikit for UI components |
--offscreen |
Add @react-three/offscreen for offscreen rendering |
--zustand |
Add zustand for state management |
--koota |
Add koota for animation |
--triplex |
Add Triplex for a visual development environment |
--package-manager <manager> |
Specify package manager (npm, yarn, or pnpm) |
--skip-setup |
Skip automatic dependency installation, dev server start, and browser opening |
-y, --yes |
Skip prompts and use default values |
Create a new project with TypeScript and drei:
npm create @react-three my-app --drei
Create a project with JavaScript and multiple features:
npm create @react-three my-app --js --drei --leva --zustand
Create a project using pnpm:
npm create @react-three my-app --package-manager pnpm
This project is supported by a few companies and individuals building cutting edge 3D Web & XR experiences. Check them out!