diff --git a/.vscode/launch.json b/.vscode/launch.json index 7b49e46ef..3c9897a48 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -508,6 +508,18 @@ "order": 10 } }, + { + "name": "Lite-Brite", + "type": "chrome", + "request": "launch", + "url": "http://localhost:4000/machines/led/lite-brite/", + "webRoot": "${workspaceFolder}", + "presentation": { + "hidden": false, + "group": "hardware", + "order": 10 + } + }, { "name": "PC.js", "type": "node", @@ -2703,9 +2715,9 @@ "request": "launch", "program": "${workspaceFolder}/tools/private/plex.js", "args": [ - "shows", - "rename", - "path" + "movies", + "search", + "file" ], "cwd": "${workspaceFolder}/tools/private", "stopOnEntry": false, diff --git a/.vscode/settings.json b/.vscode/settings.json index 78848f890..b63287345 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,7 +13,7 @@ "editor.rulers": [127], "editor.tabSize": 8, "editor.insertSpaces": false, - "workbench.colorTheme": "Dark+ Material", + "workbench.colorTheme": "Default Dark+", "workbench.colorCustomizations": { "[Atom One Dark]": { "debugToolBar.background": "#21252B" diff --git a/machines/led/releases/3.00/led-uncompiled.js b/machines/led/releases/3.00/led-uncompiled.js index 459da72eb..cd6c99bab 100644 --- a/machines/led/releases/3.00/led-uncompiled.js +++ b/machines/led/releases/3.00/led-uncompiled.js @@ -9841,6 +9841,8 @@ class LEDCtrl extends CPU { { let cpu = this, elementInput, patterns; + super.addBinding(binding, element); + switch(binding) { case LEDCtrl.BINDING.COLOR_PALETTE: case LEDCtrl.BINDING.COLOR_SELECTION: @@ -9916,7 +9918,6 @@ class LEDCtrl extends CPU { }; } } - super.addBinding(binding, element); } /** diff --git a/machines/led/releases/3.00/led.js b/machines/led/releases/3.00/led.js index d0604f5f8..8cc198bd9 100644 --- a/machines/led/releases/3.00/led.js +++ b/machines/led/releases/3.00/led.js @@ -132,8 +132,8 @@ t.update=function(a){a&&this.da(this.aa?"started with %s target\n":"stopped\n",F function Z(a,b,c){c["class"]="CPU";P.call(this,a,b,c);this.Ca=void 0;this.Zc=0;this.time=Q(this,"Time");this.time.na.push(this);this.time.Ia.push(this);this.sa=this.qa=0}A(Z,P);Z.prototype.abort=function(a){this.da("%s\n",a.message);Cc(this.time)};Z.prototype.jc=function(a){this.sa=this.qa=void 0===a?0:a;return this.ic()};Z.prototype.kc=function(){this.sa-=this.qa;this.qa=0};Z.prototype.ic=function(){return this.sa-this.qa}; function Pc(a,b,c){Z.call(this,a,b,c);this.ka=K(this,"wrap",!1);this.ua=(this.xa=K(this,"font",""))&&Qc[this.xa]||Qc.Helvetica;this.va=K(this,"rule","");this.pa=K(this,"pattern","");Rc(this,this.ya=K(this,"message",""));this.Ja=K(this,"toggleColor",!1);this.Ia=Array(Sc(this).length);if(c=Q(this,"LED",!1)){this.aa=c;Tc(this)||Bb(c,!0);this.ra=Q(this,"Input",!1);var d=this;this.za=new Cb(a,b+"Input",{"class":"Input",location:[0,0,c.za,c.ya,c.ea,c.xa],drag:!(!this.ra||!this.ra.wa),scroll:!(!this.ra|| !this.ra.na),hexagonal:c.Qa,bindings:{surface:c.Ta}});Gb(this.za,function(e,g){var f=d.aa;0<=e&&0<=g&&(d.ja?sc(f,e,g,d.ja)?uc(f,e,g,1):d.Ja?sc(f,e,g):uc(f,e,g,1-pc(f,e,g)):uc(f,e,g,1-pc(f,e,g)),tc(f,e,g,Sc(d,!!pc(f,e,g))),T(f))});this.ia=[];this.Aa=c.ga;Uc(this,this.Aa);Vc(this);Wc(this,this.ha[Xc]);Ka(this,this.Xc.bind(this))}}A(Pc,Z);t=Pc.prototype; -t.Oa=function(a,b){var c=this,d;switch(a){case Yc:case Zc:b.onchange=function(){$c(c,a)};$c(this);break;case Xc:b.onchange=function(){Wc(c)};break;case ad:Ja(b,bd(this.ha[ad]),!1,this.ha.pattern);b.onchange=function(){var e=c.ma[ad];e&&e.options.length&&((e=e.options[e.selectedIndex].value)?Tc(c,e):c.Ha())};break;case cd:b.onclick=function(){var e=dd(c,!0),g=c.ma[ed];g&&(e='"'+g.value+'":"'+e.replace(/^([0-9]+\/)*/,"")+'",');c.da("%s\n",e)};break;case fd:b.onclick=function(){var e=dd(c);c.da("%s\n", -e);var g=window.location.href;g=0<=g.indexOf("pattern=")?g.replace(/(pattern=)[^&]*/,"$1"+e.replace(/\$/g,"$$$$")):g+((0>g.indexOf("?")?"?":"&")+"pattern="+e);window.location=g};break;case ed:b.onkeypress=function(e){b.value=String.fromCharCode(e.charCode);var g=c.ma[gd];g&&(g.textContent=b.value);e.preventDefault()};break;default:a.startsWith(hd)?b.onclick=function(){Vc(c,a)}:(d=this.ha[ad])&&d[a]&&(b.onclick=function(){Tc(c,a)})}Z.prototype.Oa.call(this,a,b)}; +t.Oa=function(a,b){var c=this,d;Z.prototype.Oa.call(this,a,b);switch(a){case Yc:case Zc:b.onchange=function(){$c(c,a)};$c(this);break;case Xc:b.onchange=function(){Wc(c)};break;case ad:Ja(b,bd(this.ha[ad]),!1,this.ha.pattern);b.onchange=function(){var e=c.ma[ad];e&&e.options.length&&((e=e.options[e.selectedIndex].value)?Tc(c,e):c.Ha())};break;case cd:b.onclick=function(){var e=dd(c,!0),g=c.ma[ed];g&&(e='"'+g.value+'":"'+e.replace(/^([0-9]+\/)*/,"")+'",');c.da("%s\n",e)};break;case fd:b.onclick=function(){var e= +dd(c);c.da("%s\n",e);var g=window.location.href;g=0<=g.indexOf("pattern=")?g.replace(/(pattern=)[^&]*/,"$1"+e.replace(/\$/g,"$$$$")):g+((0>g.indexOf("?")?"?":"&")+"pattern="+e);window.location=g};break;case ed:b.onkeypress=function(e){b.value=String.fromCharCode(e.charCode);var g=c.ma[gd];g&&(g.textContent=b.value);e.preventDefault()};break;default:a.startsWith(hd)?b.onclick=function(){Vc(c,a)}:(d=this.ha[ad])&&d[a]&&(b.onclick=function(){Tc(c,a)})}}; function bd(a){var b={},c;for(c in a){for(var d=c,e=a[c],g=0;g>>=4}if(l){d++;if(h[0])h[0]--;else{l=(k=pc(e,p,m))||0;switch(k){case 1:if(l=ic,h[0]=h[2],h[0]){h[0]--;break}case ic:if(h[3]&&(l=this.ia.indexOf(e.aa[4*(m*e.ca+p)+1]||e.ia),0<=l)){for(l+=h[3];l>=this.ia.length;)l-= this.ia.length;sc(e,p,m,this.ia[l])}l=1;h[0]=h[1];h[0]&&h[0]--}l!==k&&uc(e,p,m,l)}tc(e,p,m,h)}}break;case jd:c=a||c;d=c;d=void 0===d?1:d;e=0;g=this.aa;f=g.ca;h=g.fa;if(g.qa||!kd(this,d))d=0;else{m=g.aa;n=4*d;p=4*f;l=q=k=0;for(this.na=this.wa=-1;kthis.na&&(this.na=q),q=0))}0>this.na&&(this.na=q);for(this.wa=q;k