A simple wrapper to run vanilla ThreeJS code inside a React component.
- Uses React 18 and Vite.
- Uses Leva React GUI to show passing props from React -> ThreeJS.
React-three-fiber is great if you want to write your ThreeJS code with JSX. If you prefer coding ThreeJS with vanilla JS, this template might be useful. Any of the ThreeJS examples can be loaded into this wrapper.
In the project directory, you can run:
npm install
- Install dependencies.npm run dev
- Runs the app in dev mode.npm run build
- Build app todist
folder.