npm install
npm start
This is a small primer on how to use GLTF models on the web, specifically how to use them as dynamic assets.
Live demo: https://60bce1be4d9b8cf97364d5ff--elastic-visvesvaraya-271c29.netlify.app/
npx gltf-pipeline -i model.gltf -o model.glb --draco.compressionLevel=7
npx gltfjsx model.glb
- Set up react-three-fiber
- Put
model.glb
into/public
- Put
Model.js
(the output of gltfjsx) anywhere inside/src