Welcome to react-three-fiber-learning, a project aimed at exploring the world of 3D graphics in React using react-three-fiber. This scaffold is powered by Vite, employs react-swc for faster compilation, and is typed with TypeScript. Dive in to discover how to create compelling, interactive 3D web experiences."
-
Clone the Repository:
git clone https://github.com/YassineGherbi/react-three-fiber-learning.git
-
Navigate to the Directory:
cd react-three-fiber-learning
-
Install Dependencies:
npm install
-
Run the Project:
npm run dev
For development, the command `npm run dev` will start the Vite server.
-
Build: ```npm run build```` This runs TypeScript compiler followed by Vite's build command.
-
Lint:
npm run lint
Checks your TypeScript files for linting errors. -
Preview:
npm run preview
Preview the production build locally.
To import from the public
folder, use the following syntax:
import viteLogo from '/vite.svg'
And to import from the src
folder, in this case from the assets
folder inside src
, use the following syntax:
import reactLogo from './assets/react.svg'
- React as the UI library
- react-three-fiber as the 3D library
- react-swc as the compiler
- TypeScript as the language
- Vite as the bundler
- ESLint as the linter
- Prettier as the code formatter