This code is written in JavaScript and uses the Three.js library to create a 3D viewer for G-code and STL files. The code includes functions to load, display, and manipulate the 3D models, as well as interact with the user interface.
- Load G-code and STL files
- Display the 3D models in a viewer
- Highlight specific lines or points in the models
- Play, pause, and rewind the G-code animation
- Enable fullscreen mode TODO:
- Simulate toolpath movements for G-code files
- Save and clear the loaded files
To use this code, you need to have the Three.js library included in your project. You can download the library from the official Three.js website or include it from a CDN.
Once you have the library included, you can use the functions provided in the code to load and display G-code and STL files. You can also customize the user interface and add additional functionality as needed.
To run the code, simply open the HTML file that includes this JavaScript code in a web browser.
- Three.js
- codemirror.js
This code is provided under the MIT license. Please refer to the LICENSE file for more information.
Contributions to this code are welcome. Please submit a pull request with any improvements or bug fixes.
If you have any questions or need support, please contact me