react-model-viewer-3d
v1.3.1
Published
React component for viewing models in the browser
Downloads
13
Maintainers
Readme
react-model-viewer-3d
npm package for adding interactive glTF models directly into your react application
Usage
npm i react-model-viewer-3d
import ModelViewer from 'react-model-viewer-3d'
<ModelViewer
gltf={'./example.gltf'}
scale={2} // Defaults to 1
rotation={[0, Math.PI /2, 0]} // Defaults to [0, 0, 0]
height={'300px'} // Defaults to 300px
width={'30vw'} // Defaults to 300px
/>
Dependencies
- React
- Threejs
- react-three/fiber & react-three/drei (Shout out to the PMNDRS)
Author
JackYouk
- Email: [email protected]
- Github: JackYouk
License
This project is licensed under the terms of the MIT license.