xtrInfo.updateInfo=function(){xtrInfo.screenWidth=parseInt($(".zone_contener").width());xtrInfo.screenHeight=parseInt($(".zone_contener").height());xtrInfo.mainCanvas.width=xtrInfo.screenWidth;xtrInfo.mainCanvas.height=xtrInfo.screenHeight;xtrInfo.cx=Math.round(xtrInfo.screenWidth/2);xtrInfo.cy=Math.round(xtrInfo.screenHeight/2);$(".contener").height(xtrInfo.screenHeight-$(".zoneh").height()-$(".zonef").height());xtrInfo.isMobile=(xtrInfo.screenWidth<=748?1:0);xtrInfo.isResize=(xtrInfo.screenWidth!=xtrInfo.screenWidth_old||xtrInfo.screenHeight!=xtrInfo.screenHeight_old?true:!1);xtrInfo.screenWidth_old=xtrInfo.screenWidth;xtrInfo.screenHeight_old=xtrInfo.screenHeight} xtrInfo.sinusScroll={scroll_text:" * XTR GAMES WELCOME ON THIS PLACE, YOU CAN FIND HERE FREE ONLINE GAMES CODED IN HTML5, ACTUALLY ONLY ONE GAME IS READY: ROWS BLASTER. GREETINGS GO TO: ALL DEMOSCENERS ESPECIALLY TO AMIGA AND CPC FREAKS ...",scroll_pt:0,scroll_x:0,scroll_speed:4,scroll_angle:0,ct_pause:0,font_width:17,font:new Image(),canvasBuffer:document.createElement('canvas'),isInit:!1,init:function(){this.font.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA8AAAAAQAQMAAADjzoRqAAAAA3NCSVQICAjb4U/gAAAABlBMVEX/AAD///9BHTQRAAAAAnRSTlMA/1uRIrUAAAAJcEhZcwAACusAAArrAYKLDVoAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAAFnRFWHRDcmVhdGlvbiBUaW1lADA1LzE4LzEzNCOpYwAAAlpJREFUOI3Fld2N2zAMx3kwcH6TN5AXCayV7vEegsgTdITO4gk8QqAR/KiiNNU/ZTlWcglwQAtUAhFHIvmz+CETUTuZDyqjGdvQjlQNF7uQYopskjAlcdFJvQuRFDfRyQZrhgfowsrtIuqBzTov7+opG9+Du9BONdhzHxIn3sGevdS7EEm8ic4CvkAXVn4XUQ8KjuYFuA9tqME4Y0gCaAHrPGKiLra1fRYw88O67iiY7QuwG2mpwTK4QJagzoRp2Yo5wHGABgIr2BHKGqYLZNbItF6xZotQ9gCwDGyap2CijxqcbAYPBXzSN74HY0cUyBU4LQDPitomSGYD+zPsYwHXoAOs+QP4Zxd6aTTHKBL6RMaqUMdLBrMC05QmDXAGh3twihls19lFMX34Bvj3tQuOm4gsoUhocdFXYBxRwfEGNgU83YPhS3+Hde4XFOj4DfAvOPKx4a1A3oLnup3e4sOJzZcTW00PbPT5vM7wJkJPxlFcGzjCER4GVOLAtpnYUpXjZsngIZddznDOsU2LZLDYJCinEw1kUIRxvfYLev0pOHQZ3IQSy4vTMOONt0bSpwoMrTTfGoa2dkqyqsx6fiRI+HOzXxe9gOhop2dgXVWAqlZgegBPz8HMN7D+OxV73Aj+/E/AOp6CLzs4r9liP2ngX4D70OUgd+NfnXi4A5tiP+pLvAB3oZtqMKo4txLU0U6tlpw5tAuYSy53MLP1GexR7/4KMKxwX+P+juYFuA1dPk9PG9jFDNaSwAXS6vfoKziWXO5gfIlcBjt0uPuxXSAObZTi8n4D/5/xByMQHwqwVDPhAAAAAElFTkSuQmCC";this.canvasBuffer.width=xtrInfo.screenWidth;this.canvasBuffer.height=128*2;this.ctx_canvasBuffer=this.canvasBuffer.getContext("2d");this.isInit=!0},dispFont:function(context,cx,cy,msg,zoom){context.imageSmoothingEnabled=!1;for(let n=0;n=16*3){this.scroll_x=0;this.scroll_pt++} var nbCharsets=Math.round(xtrInfo.screenWidth/this.font_width)+1;let croptext=this.scroll_text.substr(this.scroll_pt,nbCharsets);if(this.scroll_pt==this.scroll_text.length){this.scroll_pt=0} if(croptext.substr(0,1)=="*"&&this.scroll_x==0){this.scroll_x-=this.scroll_speed;this.ct_pause++;if(this.ct_pause==200){this.scroll_x+=this.scroll_speed;this.ct_pause=0}} this.dispFont(this.ctx_canvasBuffer,-this.scroll_x,scrolly,croptext,3);dispContext.globalCompositeOperation='lighter';dispContext.drawImage(this.canvasBuffer,0,xtrInfo.cy-128+16*3);dispContext.globalCompositeOperation='source-over'} xtrInfo.starField={angle:0,angle2:0,distance:0,stars:[],isInit:!1,init:function(nb_stars){for(let i=0;i=xtrInfo.screenWidth||y<0||y>=xtrInfo.screenHeight){continue} let t=5-star.z/200;dispContext.fillStyle="#ffffff";dispContext.beginPath();dispContext.arc(x,y,t,0,2*Math.PI);dispContext.fill()}}};xtrInfo.simplescroll={scroll_text:"HELLO WORLD ... HELLO WORLD ... HELLO WORLD ... HELLO WORLD ... HELLO WORLD ... HELLO WORLD ... HELLO WORLD ... HELLO WORLD ... HELLO WORLD ... HELLO WORLD ... HELLO WORLD ...",scroll_pt:0,scroll_x:0,scroll_speed:1,mycopper:{step:0,r1:255,g1:0,b1:0,r2:255,g2:255,b2:0,},font_width:16,font:new Image(),canvasBuffer:document.createElement('canvas'),isInit:!1,init:function(){this.font.src="/gfx/font-16x13-alpha.png";this.canvasBuffer.width=xtrInfo.screenWidth;this.canvasBuffer.height=13;this.ctx_canvasBuffer=this.canvasBuffer.getContext("2d");this.isInit=!0},dispFont:function(context,cx,cy,msg,zoom){context.imageSmoothingEnabled=!1;for(let n=0;n=255)this.mycopper.step=1} if(this.mycopper.step==1){this.mycopper.r1-=copspeed;this.mycopper.b2+=copspeed;if(this.mycopper.b2>=255)this.mycopper.step=2} if(this.mycopper.step==2){this.mycopper.b1+=copspeed;this.mycopper.g2-=copspeed;if(this.mycopper.b1>=255)this.mycopper.step=3} if(this.mycopper.step==3){this.mycopper.g1-=copspeed;this.mycopper.r2+=copspeed;if(this.mycopper.r2>=255)this.mycopper.step=4} if(this.mycopper.step==4){this.mycopper.r1+=copspeed;this.mycopper.b2-=copspeed;if(this.mycopper.r1>=255)this.mycopper.step=5} if(this.mycopper.step==5){this.mycopper.b1-=copspeed;this.mycopper.g2+=copspeed;if(this.mycopper.g2>=255)this.mycopper.step=0} degrade.addColorStop(0,"rgb("+this.mycopper.r1+","+this.mycopper.g1+","+this.mycopper.b1+")");degrade.addColorStop(1,"rgb("+this.mycopper.r2+","+this.mycopper.g2+","+this.mycopper.b2+")");this.canvasBuffer.width=xtrInfo.screenWidth;this.scroll_x+=this.scroll_speed;if(this.scroll_x>=this.font_width){this.scroll_x=0;this.scroll_pt++} var nbCharsets=Math.round(xtrInfo.screenWidth/this.font_width)+1;var croptext=this.scroll_text.substr(this.scroll_pt,nbCharsets);if(this.scroll_pt==this.scroll_text.length){this.scroll_pt=0} this.dispFont(this.ctx_canvasBuffer,-this.scroll_x,0,croptext,1);this.ctx_canvasBuffer.globalCompositeOperation='source-in';this.ctx_canvasBuffer.beginPath();this.ctx_canvasBuffer.fillStyle=degrade;this.ctx_canvasBuffer.rect(0,0,xtrInfo.screenWidth,13);this.ctx_canvasBuffer.fill();this.ctx_canvasBuffer.globalCompositeOperation='source-over';dispContext.drawImage(this.canvasBuffer,0,scroll_posy)} xtrInfo.clearCooper=function(dispContext){let copper=dispContext.createLinearGradient(0,0,0,80);copper.addColorStop(0,"#002255");copper.addColorStop(1,"#000000");dispContext.beginPath();dispContext.rect(0,0,xtrInfo.screenWidth,80);dispContext.fillStyle=copper;dispContext.fill();copper=dispContext.createLinearGradient(0,80,0,xtrInfo.screenHeight-32);copper.addColorStop(0,"#001133");copper.addColorStop(0.8,"#000011");copper.addColorStop(1,"#002244");dispContext.beginPath();dispContext.rect(0,80,xtrInfo.screenWidth,xtrInfo.screenHeight-80-32);dispContext.fillStyle=copper;dispContext.fill();copper=dispContext.createLinearGradient(0,xtrInfo.screenHeight-32,0,xtrInfo.screenHeight);copper.addColorStop(0,"#001133");copper.addColorStop(1,"#001122");dispContext.beginPath();dispContext.rect(0,xtrInfo.screenHeight-32,xtrInfo.screenWidth,32);dispContext.fillStyle=copper;dispContext.fill()} function getMousePos(evt){let rect=xtrInfo.mainCanvas.getBoundingClientRect() let root=document.documentElement;xtrInfo.mouseX=evt.clientX-rect.left-root.scrollLeft;xtrInfo.mouseY=evt.clientY-rect.top-root.scrollTop} var particles=[];var max=100;var speed=3;var size=10;class Particle{constructor(x,y,xs,ys){this.x=x;this.y=y;this.xs=xs;this.ys=ys;this.life=0}} function animParticle(dispContext){dispContext.globalCompositeOperation="lighter";for(var i=0;i<10;i++){var p=new Particle(xtrInfo.mouseX,xtrInfo.mouseY,(Math.random()*2*speed-speed)/2,0-Math.random()*2*speed);particles.push(p)} for(var i=0;i=max){particles.splice(i,1);i--}} dispContext.globalCompositeOperation="source-over"} document.addEventListener("mousemove",getMousePos)