https://github.com/tyrealgray/gcodepainter
A GCodePainter based on html canvas
https://github.com/tyrealgray/gcodepainter
3d-printer 3d-printing canvas gcode
Last synced: 7 months ago
JSON representation
A GCodePainter based on html canvas
- Host: GitHub
- URL: https://github.com/tyrealgray/gcodepainter
- Owner: TyrealGray
- License: gpl-2.0
- Created: 2015-11-16T02:56:17.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-05-13T14:52:33.000Z (almost 10 years ago)
- Last Synced: 2025-07-08T06:03:23.458Z (8 months ago)
- Topics: 3d-printer, 3d-printing, canvas, gcode
- Language: JavaScript
- Homepage: https://tyrealgray.github.io/GCodePainter
- Size: 3.97 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GCodePainter
A GCodePainter html canvas based on [hudbrog's gCodeViewer](https://github.com/hudbrog/gCodeViewer)
### API:
init
loadFile
loadUrl
paintLayer
onParseProgress
onParseDone
### Example:
```
gCodePainter.init({
divID: 'renderView',
workPath: 'js'
});
gCodePainter.onParseDone = function(number) {
document.getElementById('gcodeRangeSlider').max = number - 1;
document.getElementById('gcodeRangeSlider').value = 1;
}
document.getElementById('gcodeFileInput').addEventListener('change', function(uploader) {
gCodePainter.loadFile(uploader.target.files[0]);
});
document.getElementById('gcodeRangeSlider').addEventListener('change', function(event) {
gCodePainter.paintLayer(event.target.valueAsNumber);
});
```
**For more detail,download release version**
### [check this demo(please wait while gcode file is downloading)](http://tyrealgray.github.io/GCodePainter/demo.html)
