From 6f85dc3a2ee5b378a7f09bea3ff3eecf40a71218 Mon Sep 17 00:00:00 2001 From: Kragrathea Date: Sat, 29 Aug 2020 13:19:11 -0700 Subject: [PATCH] Change highlight color to darker --- octoprint_prettygcode/static/js/prettygcode.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/octoprint_prettygcode/static/js/prettygcode.js b/octoprint_prettygcode/static/js/prettygcode.js index 5fae573..887a486 100644 --- a/octoprint_prettygcode/static/js/prettygcode.js +++ b/octoprint_prettygcode/static/js/prettygcode.js @@ -325,7 +325,6 @@ $(function () { this.showNozzle=true; this.highlightCurrentLayer=true; }; - var pgSettings = new PGSettings(); function updateWindowStates() { @@ -423,7 +422,7 @@ $(function () { gui.add(pgSettings, 'showNozzle'); //gui.add(pgSettings, 'reloadGcode'); - + var folder = gui.addFolder('Windows');//hidden. folder.add(pgSettings, 'showState').onFinishChange(updateWindowStates).listen(); folder.add(pgSettings, 'showWebcam').onFinishChange(updateWindowStates).listen(); @@ -1424,7 +1423,7 @@ $(function () { if(pgSettings.fatLines) { highlightMaterial=new THREE.LineMaterial({ - linewidth: 3, // in pixels + linewidth: 4, // in pixels //transparent: true, //opacity: 0.5, //color: new THREE.Color(curColorHex),// rainbow.getColor(layers.length % 64).getHex() @@ -1505,6 +1504,8 @@ $(function () { //fake a glow by ramping the diffuse color. let nv = 0.5+((Math.sin(elapsed*4)+1)/4.0); //console.log(nv); + //highlightMaterial.uniforms.linewidth.value=nv*15; + nv=0.5; highlightMaterial.uniforms.diffuse.value.r=nv; highlightMaterial.uniforms.diffuse.value.g=nv; highlightMaterial.uniforms.diffuse.value.b=nv;