I want to make a 3-D viewer using WebGL and the imported model I need to access is an STL or .stl file. I believe I need to convert an STL file to .js so that it can be compatible in a web browser. How do I make the conversion while keeping the integrity and detail of the STL file?
Share
You do not really have to create a
.jsfile. You can use thethree.js loaderfor.stlfiles which is located inexamples\js\loaders\STLLoader.js(from your main download location of three.js).In addition you can look at
examples\webgl_loader_stl.htmlto see how this is done.