JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 720
  • Score
    100M100P100Q106094F
  • License MIT

A component for viewing an STL object from a given URL by utilizing Three.js

Package Exports

  • stl-viewer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (stl-viewer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React STL Viewer

New maintainer needed.

A React component for viewing an STL object from a given URL by utilizing Three.js

Looking for contributors

See a live demo here.

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

Installation

npm install stl-viewer

Usage

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}
  />

Contributing

  • If you test the building of the dist, please do not commit those files.

Testing

  • 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