mirror of
https://github.com/omrips/viewstl
synced 2026-01-02 20:29:58 +03:00
af57bf6c1ed512faeb1acfae76b2d935db9181b0
Bug fixes and minor changes
Viewstl
Javascript STL/OBJ 3D files Viewer
Reads binary/ASCII STL files; OBJ files
Uses THREE.js lib - Can load THREE.js lib files in the background (no need to deal with THREE JS at all)
Usage:
At the html page header / page body:
<script src="stl_viewer.min.js"></script>
At the page body, create an element to contain the Stl Viewer, and give it an ID:
<div id="stl_cont"></div>
Create a new instance of Stl Viewer (simplest initiation - read and view STL file called 'mystl.stl'):
var stl_viewer=new StlViewer(document.getElementById("stl_cont"), { models: [ {id:0, filename:"mystl.stl"} ] });
important! if script files are not at the same folder as your page is - use 'load_three_files' parameter:
var stl_viewer=new StlViewer(document.getElementById("stl_cont"), { load_three_files: **<your scripts folder>**, models: [ {id:0, filename:"mystl.stl"} ] });
more at https://www.viewstl.com/plugin/
Description
Viewstl Javascript plugin - STL/OBJ 3D files Viewer
https://www.viewstl.com/plugin/
Languages
JavaScript
100%