We found this web app which views 3d stl files directly in the browser with everything is done client side using three.js and file uploading. site
Rather than start with the libraries we whittled the application down until it fit nicely in the lineup and still use drag and zoom gestures to interact.
//scad.fed.wiki/assets/viewstl/viewstl.html?stl=http://scad.fed.wiki/assets/viewstl/twist.stl HEIGHT 370
We saved the javascript from the browser and started editing. We removed most of the user interface substituting a query argument for the url to be viewed. This requires cors headers which we have.
We serve the file and viewer from an assets folder. Here we render twist.stl in its own tab. view
The Frame plugin brings the view into the lineup. For this we've made some further adjustments in ViewSTL's canvas dimensions.
See Dual PerspectiveCameras used for effects such as 3D Anaglyph or Parallax Barrier. docs example github
.
THREE.js STL parser. javascript example