stl-viewer
Version:
A component for viewing an STL object from a given URL by utilizing Three.js
39 lines (25 loc) • 943 B
Markdown
A React component for viewing an STL object from a given URL by utilizing Three.js
See a <a href="http://chiedolabs.github.io/react-stl-viewer/" target="_blank">live demo here.</a>
*Note that you will still have to abide by the rules of CORS so you won't just be able to load a 3D file from someone else's site*
npm install stl-viewer
import STLViewer from 'stl-viewer'
<STLViewer
url='http://www.example.com/example-url.stl'
width={400}
height={400}
modelColor='#B92C2C'
backgroundColor='#EAEAEA'
rotate={true}
orbitControls={true}
/>
- If you test the building of the dist, please do not commit those files.
- Build with `yarn run build`
- Run this in the root of the project folder `python -m SimpleHTTPServer 8000`
- Visit `http://0.0.0.0:8000` in your browser