diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..9127b794 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +## next +- fully typed +- added `lineWidth` option + +## 1.0.0 +- ported to typescript +- added distributable library build in dist folder +- some minor fixes diff --git a/src/demo/demo.js b/src/demo/demo.js index 2258ad8d..1976599b 100644 --- a/src/demo/demo.js +++ b/src/demo/demo.js @@ -1,5 +1,3 @@ - - let gcodePreview; const slider = document.getElementById('layers'); @@ -7,11 +5,13 @@ const scaleSlider = document.getElementById('scale'); const rotationSlider = document.getElementById('rotation'); const toggleAnimation = document.getElementById('toggle-animation'); const toggleZoneColors = document.getElementById('zone-colors'); +const lineWidth = document.getElementById('line-width'); function initDemo() { const preview = new GCodePreview.Preview({ targetId : 'renderer', scale: 7, + lineWidth: 0.6 }); info(preview.canvas); @@ -31,6 +31,11 @@ function initDemo() { preview.render(); }) + lineWidth.addEventListener('input', function(evt) { + preview.lineWidth = +lineWidth.value; + preview.render(); + }) + window.addEventListener('resize', function() { preview.resize(); preview.render(); diff --git a/src/demo/index.html b/src/demo/index.html index e6d216d0..4769bc9f 100644 --- a/src/demo/index.html +++ b/src/demo/index.html @@ -8,6 +8,7 @@