Skip to content

max-mapper/stl-obj-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published