Skip to content

drcmda/floating-shoe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Tutorial: https://www.youtube.com/watch?v=xy_tbV4pC54

Live demo: https://codesandbox.io/s/floating-shoe-forked-qxjoj

How to compress assets and turn them into JSX components

  1. npx gltf-pipeline -i model.gltf -o model.glb --draco.compressionLevel=7
  2. npx gltfjsx model.glb

How to include them in your project

  1. Set up react-three-fiber
  2. Put model.glb into /public
  3. Put Model.js (the output of gltfjsx) anywhere inside /src

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published