Added new blog post: Flickery Fakery
This commit is contained in:
parent
2d9bce28d3
commit
88ab0cd106
10 changed files with 201 additions and 83 deletions
|
|
@ -511,9 +511,9 @@ Cp[1|sp]=function(a){a+=this.G;var b=a&-2;a=this.controller.Wa&(b==a?16711935:-1
|
|||
Cp[98]=function(a,b){a+=this.G;b=$p[b&15];b&=this.controller.nb;b=b&this.controller.qb|this.controller.nb&~this.controller.qb;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};Cp[162]=function(a,b){a+=this.G;b=$p[b&15];b|=this.controller.nb;b=b&this.controller.qb|this.controller.nb&~this.controller.qb;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};
|
||||
Cp[226]=function(a,b){a+=this.G;b=$p[b&15];b^=this.controller.nb;b=b&this.controller.qb|this.controller.nb&~this.controller.qb;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};Cp[3]=function(a,b){a+=this.G;b=b>>this.controller.Ac|b<<8-this.controller.Ac&255;b=(b|b<<8|b<<16|b<<24)&this.controller.qb;b=this.controller.Xe&b|this.controller.nb&~b;b=b&this.controller.Wa|this.U[a]&~this.controller.Wa;this.U[a]!=b&&(this.U[a]=b,this.Da=!0)};
|
||||
function W(a,b,c,d,e){u.call(this,"Video",a);var f=this;this.Pc=La("Gecko/");var g=["","moz","ms","webkit"];this.ba=a.model;var h=aq[this.ba]||aq.mda;this.Ma=h[0];this.Wc=a.memory||0;this.bd=a.switches;this.aa=a.mode;if(null==this.aa||null==bq[this.aa])this.aa=h[1];this.Gb=a.charCols;this.lc=a.charRows;if(void 0===this.Gb||void 0===this.lc)this.Gb=bq[this.aa][0],this.lc=bq[this.aa][1];this.W=a.screenWidth;this.fa=a.screenHeight;this.Rc=a.scale;this.qd=12<=Math.round(this.W/this.Gb);this.M=b;this.J=
|
||||
c;this.D=(this.Jf=d)||b||null;this.Wb=a.screenColor||"black";this.Uc=(1-(a.flicker||0)).toString();this.Bb=!1;b&&(b.style.backgroundColor=this.Wb);e&&(e.style.backgroundColor=this.Wb);b=a.smoothing;(c=Ma("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.J[d]){this.J[d]=b;break}this.cd=a.touchScreen;this.rc=cq;this.K=null;this.pd=a.autoLock;this.$a=this.Eb=0;this.pa=[];this.ea=Array(this.Ma==Yn?256:16);this.Ha=
|
||||
!1;this.jb=null;if(this.Aa=e)if(this.jb=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){dq(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,function(){dq(f,
|
||||
null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Vf(!0)},this.D.onblur=function(){return f.Vf(!1)},this.D.Nd=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.A=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.Nd&&(e=function(){f.Ze(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
|
||||
c;this.D=(this.Jf=d)||b||null;this.Wb=a.screenColor||"black";this.Uc=(1-(Ma("flicker")||a.flicker||0)).toString();this.Bb=!1;b&&(b.style.backgroundColor=this.Wb);e&&(e.style.backgroundColor=this.Wb);b=a.smoothing;(c=Ma("smoothing"))&&(b="true"==c);if(null!=b)for(c=0;c<g.length;c++)if(d=(d=g[c])?d+"ImageSmoothingEnabled":"imageSmoothingEnabled",void 0!==this.J[d]){this.J[d]=b;break}this.cd=a.touchScreen;this.rc=cq;this.K=null;this.pd=a.autoLock;this.$a=this.Eb=0;this.pa=[];this.ea=Array(this.Ma==Yn?
|
||||
256:16);this.Ha=!1;this.jb=null;if(this.Aa=e)if(this.jb=e.requestFullscreen||e.msRequestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullscreen){for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenchange","on"+d in document){document.addEventListener(d,function(){dq(f,!!(document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement))},!1);break}for(c=0;c<g.length;c++)if(d=g[c]+"fullscreenerror","on"+d in document){document.addEventListener(d,
|
||||
function(){dq(f,null)},!1);break}}this.D&&(this.D.onfocus=function(){return f.Vf(!0)},this.D.onblur=function(){return f.Vf(!1)},this.D.Nd=this.D.requestPointerLock||this.D.mozRequestPointerLock||this.D.webkitRequestPointerLock,this.D.A=this.D.exitPointerLock||this.D.mozExitPointerLock||this.D.webkitExitPointerLock,this.D.Nd&&(e=function(){f.Ze(document.pointerLockElement===f.D||document.mozPointerLockElement===f.D||document.webkitPointerLockElement===f.D)},"onpointerlockchange"in document?document.addEventListener("pointerlockchange",
|
||||
e,!1):"onmozpointerlockchange"in document?document.addEventListener("mozpointerlockchange",e,!1):"onwebkitpointerlockchange"in document&&document.addEventListener("webkitpointerlockchange",e,!1)));(this.ua=a.fontROM)&&"json"!=pa(this.ua)&&(this.ua=Fa()+"/api/v1/dump?file="+this.ua+"&format=bytes")}ba(W,u);l=W.prototype;
|
||||
l.ic=function(a,b,c,d){var e=this;this.na=b;this.S=c;this.Ea=d;c=(c=aq[this.ba])&&c[0];c!==eq&&(pc(b,this,fq),sc(b,this,gq));c!==hq&&(pc(b,this,iq),sc(b,this,jq));this.Ma>=Wn&&(pc(b,this,kq),sc(b,this,lq));this.Ma==Yn&&(pc(b,this,mq),sc(b,this,nq));if((this.C=Bb(a,"Keyboard"))&&this.M){for(var f in this.ia)0<f.indexOf("lock")&&this.C.yb("led",f,this.ia[f]);this.C.yb(this.Jf?"textarea":"canvas","screen",this.D)}this.sb=9;(this.V=Bb(a,"ChipSet"))&&this.bd&&this.Ma==Wn&&(this.sb=zj(this.bd,this.sb));
|
||||
"mouse"==this.cd?(this.K=Bb(a,"Mouse"))&&oq(this,pq):"keygrid"==this.cd&&this.C&&oq(this,qq);if(this.ua){var g="Loading "+this.ua+"...";Ea(this.ua,null,!0,function(a,b,c){rq(e,a,b,c)},function(){e.ub(g,pb.ae)})}};
|
||||
|
|
@ -564,7 +564,7 @@ gp[Yn]=["VGA",980,753664,16384,262144,7];
|
|||
var cq=0,qq=1,pq=2,vq=[[1036,1038,1033],[1037,1032,1039],[1035,1040,1034]],fq={948:W.prototype.rl,949:W.prototype.ql,952:W.prototype.sl,954:W.prototype.tl},gq={948:W.prototype.Om,949:W.prototype.Nm,952:W.prototype.Pm},iq={980:W.prototype.Wk,981:W.prototype.Vk,984:W.prototype.Xk,985:W.prototype.Uk,986:W.prototype.Yk},jq={980:W.prototype.rm,981:W.prototype.qm,984:W.prototype.sm,985:W.prototype.pm},kq={960:W.prototype.Qk,961:W.prototype.lk,962:W.prototype.Dl,964:W.prototype.Bl,965:W.prototype.Al,974:W.prototype.kl,
|
||||
975:W.prototype.jl},lq={954:W.prototype.Kj,960:W.prototype.Jj,961:W.prototype.Jj,962:W.prototype.Qm,964:W.prototype.Wm,965:W.prototype.Vm,970:W.prototype.Jm,972:W.prototype.Im,974:W.prototype.Hm,975:W.prototype.Gm,986:W.prototype.Kj},mq={963:W.prototype.El,966:W.prototype.cl,967:W.prototype.dl,969:W.prototype.bl,970:W.prototype.Fl,972:W.prototype.Gl},nq={963:W.prototype.Ym,966:W.prototype.xm,967:W.prototype.ym,968:W.prototype.zm,969:W.prototype.wm};
|
||||
Qa(function(){for(var a=gb(document,"pcx86","video"),b=0;b<a.length;b++){var c=a[b],d=hb(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.height="auto";0<=(window?window.navigator.userAgent:"").indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height=(a.clientWidth*
|
||||
d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize(null));var f=+(d.aspect||Ma("aspect"));f&&.3<=f&&3.33>=f&&(Pa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");La("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new W(d,e,g,f,c);fb(d,c)}});
|
||||
d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize(null));var f=+(Ma("aspect")||d.aspect);f&&.3<=f&&3.33>=f&&(Pa("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");La("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new W(d,e,g,f,c);fb(d,c)}});
|
||||
function zr(a){u.call(this,"ParallelPort",a);this.G=a.adapter;switch(this.G){case 1:this.D=956;this.C=7;break;case 2:this.D=888;this.C=7;break;case 3:this.D=632;this.C=5;break;default:q("Unrecognized parallel adapter #"+this.G);return}this.A=this.B=null;a=a.binding;"console"==a?this.B="":db(this,a,Ar)}ba(zr,u);l=zr.prototype;l.yb=function(a,b,c){switch(b){case Ar:return this.ia[b]=this.A=c,!0}return!1};
|
||||
l.ic=function(a,b,c,d){this.na=b;this.S=c;this.Ea=d;this.V=Bb(a,"ChipSet");pc(b,this,Br,this.D);sc(b,this,Cr,this.D);sb(this)};l.Pb=function(a,b){if(!b)if(!a||!this.restore)this.reset();else if(!this.restore(a))return!1;return!0};l.Ob=function(a){return a?this.save():!0};l.reset=function(){Dr(this)};l.save=function(){var a=new We(this),b=0,c=[];c[b++]=this.F;c[b++]=this.Cb;c[b]=this.Ge;a.set(0,c);return a.data()};l.restore=function(a){return Dr(this,a[0])};
|
||||
function Dr(a,b){var c=0;b||(b=[0,0,0]);a.F=b[c++];a.Cb=b[c++];a.Ge=b[c];return!0}l.el=function(){return this.F};l.Cl=function(){return this.Cb};l.al=function(){return this.Ge};l.Am=function(a,b){this.F=b;this.Cb|=Er;a=!1;this.A&&(8==b?this.A.value=this.A.value.slice(0,-1):(this.A.value+=String.fromCharCode(b),this.A.scrollTop=this.A.scrollHeight),a=!0);if(null!=this.B){if(10==b||1024<=this.B.length)this.ub(this.B),this.B="";10!=b&&(this.B+=String.fromCharCode(b));a=!0}a&&(this.Cb&=~Er);Fr(this)};
|
||||
|
|
|
|||
Loading…
Reference in a new issue