Skip to content

Commit

Permalink
Update frontend files with 'npm run build'
Browse files Browse the repository at this point in the history
  • Loading branch information
THATDONFC committed Jul 29, 2022
1 parent 09fa800 commit 3195350
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wled00/html_other.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ content="width=device-width,initial-scale=1,minimum-scale=1"><meta
charset="utf-8"><meta name="theme-color" content="#222222"><title>
WLED Live Preview</title><style>body{margin:0}</style></head><body><canvas
id="liveviewCanvas">LiveView</canvas><script>
var canvas=document.getElementById("liveviewCanvas");canvas.width=.98*window.innerWidth,canvas.height=.98*window.innerHeight;var ws,leds="",matrixWidth=0,pixelsPerLed=0;if(canvas.getContext){var ctx=canvas.getContext("2d");function drawLedCircles(e,t,i,n,a,s){ctx.fillStyle=`rgb(${i},${n},${a})`,ctx.beginPath(),ctx.arc(e*pixelsPerLed+pixelsPerLed/2,t*pixelsPerLed+pixelsPerLed/2,pixelsPerLed/2,0,2*Math.PI),ctx.fill()}function paintLeds(){for(i=4;i<leds.length;i+=3){let e=(i-4)/3;drawLedCircles(e%matrixWidth,Math.floor(e/matrixWidth),leds[i],leds[i+1],leds[i+2],255)}}}function updatePreview(e){matrixWidth=(leds=e)[2],matrixHeight=leds[3],pixelsPerLed=Math.min(canvas.width/matrixWidth,canvas.height/matrixHeight),console.log(canvas.width,matrixWidth,canvas.height,matrixHeight,pixelsPerLed,leds),paintLeds()}function getLiveJson(e){try{if("[object ArrayBuffer]"===toString.call(e.data)){let e=new Uint8Array(event.data);if(76!=e[0])return;updatePreview(e)}}catch(e){console.error("Peek WS error:",e)}}try{ws=top.window.ws}catch(e){}ws&&ws.readyState===WebSocket.OPEN?(console.info("Peek uses top WS"),ws.send("{'lv':true}")):(console.info("Peek WS opening"),(ws=new WebSocket(("https:"==window.location.protocol?"wss":"ws")+"://"+document.location.host+"/ws")).onopen=function(){console.info("Peek WS open"),ws.send("{'lv':true}")}),ws.binaryType="arraybuffer",ws.addEventListener("message",getLiveJson)
var canvas=document.getElementById("liveviewCanvas");canvas.width=.98*window.innerWidth,canvas.height=.98*window.innerHeight;var ws,leds="",matrixWidth=0,pixelsPerLed=0;if(canvas.getContext){var ctx=canvas.getContext("2d");function drawLedCircles(e,t,i,n,a,s){ctx.fillStyle=`rgb(${i},${n},${a})`,ctx.beginPath(),ctx.arc(e*pixelsPerLed+pixelsPerLed/2,t*pixelsPerLed+pixelsPerLed/2,pixelsPerLed/2,0,2*Math.PI),ctx.fill()}function paintLeds(){for(i=4;i<leds.length;i+=3){let e=(i-4)/3;drawLedCircles(e%matrixWidth,Math.floor(e/matrixWidth),leds[i],leds[i+1],leds[i+2],255)}}}function updatePreview(e){matrixWidth=(leds=e)[2],matrixHeight=leds[3],pixelsPerLed=Math.min(canvas.width/matrixWidth,canvas.height/matrixHeight),paintLeds()}function getLiveJson(e){try{if("[object ArrayBuffer]"===toString.call(e.data)){let e=new Uint8Array(event.data);if(76!=e[0])return;updatePreview(e)}}catch(e){console.error("Peek WS error:",e)}}try{ws=top.window.ws}catch(e){}ws&&ws.readyState===WebSocket.OPEN?(console.info("Peek uses top WS"),ws.send("{'lv':true}")):(console.info("Peek WS opening"),(ws=new WebSocket(("https:"==window.location.protocol?"wss":"ws")+"://"+document.location.host+"/ws")).onopen=function(){console.info("Peek WS open"),ws.send("{'lv':true}")}),ws.binaryType="arraybuffer",ws.addEventListener("message",getLiveJson)
</script></body></html>)=====";
Expand Down

0 comments on commit 3195350

Please sign in to comment.