All Projects → maxogden → stl-obj-viewer

maxogden / stl-obj-viewer

Licence: other
super simple viewer for .stl or .obj files powered by three.js

Programming Languages

javascript
184084 projects - #8 most used programming language

stl-obj-viewer

uses three.js to display a stl or obj file. based on http://lazarsoft.info/objstl/

NPM

api

var createViewer = require('stl-obj-viewer')

returns a function you can use to create a viewer instance

var viewer = createViewer(containerElement)

returns a new viewer and appends the empty canvas to the dom inside containerElement. containerElement has to be a valid dom element, otherwise it will use document.body.

viewer.readStl(stlStringOrBinary)

renders the stl to the viewer. calling this again will remove the old model and display the new one

viewer.readObj(objString)

renders the obj to the viewer. calling this again will remove the old model and display the new one

license

BSD

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].