see: https://github.com/pmndrs/react-three-fiber
% yarn install
% yarn dev
โ Local: http://localhost:5173/
-
Create vite
% yarn create vite yarn create v1.22.19 [1/4] ๐ Resolving packages... [2/4] ๐ Fetching packages... [3/4] ๐ Linking dependencies... [4/4] ๐จ Building fresh packages... success Installed "[email protected]" with binaries: - create-vite - cva โ Project name: โฆ react-three-fiber-example โ Select a framework: โบ React โ Select a variant: โบ TypeScript
-
Add node modules
% yarn add three @react-three/fiber % yarn add --dev @types/three
-
Edit App.tsx