-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html.close
executable file
·3 lines (1 loc) · 5.75 KB
/
index.html.close
1
<!doctype html><html><head><meta charset="utf-8" /><title>SYSLAB</title><meta name="viewport" content="width=device-width,initial-scale=1.0, user-scalable=0" /><style>@font-face{font-family:'syslab_main_fonts';src:url(assert/syslab_main_fonts.woff) format('woff'),url(assert/syslab_main_fonts.ttf) format('truetype')}html,body,input,textarea{font-family:"syslab_main_fonts","微软雅黑";color:#eee;text-shadow:0 0 20px #444}@font-face{font-family:'SYSLAB_icon_Fonts';src:url(assert/SYSLAB_icon_Fonts.woff) format('woff'),url(assert/SYSLAB_icon_Fonts.ttf) format('truetype')}@font-face{font-family:'SYSLAB_logo_Fonts';src:url(assert/SYSLAB_logo_Fonts.woff) format('woff'),url(assert/SYSLAB_logo_Fonts.ttf) format('truetype')}body{overflow:hidden}.ani,#SYS_bg{-webkit-transition:all .6s ease-in-out;-moz-transition:all .6s ease-in-out;-ms-transition:all .6s ease-in-out;-o-transition:all .6s ease-in-out;transition:all .6s ease-in-out}#SYS_bg{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#ddd;opacity:0}#SYS_fps{position:fixed;bottom:2px;right:2px;font-size:8px;color:#444;text-shadow:none}#SYS_notice{position:absolute;width:100%;font-size:48px;top:20%}#SYS_notice span{font-family:'SYSLAB_icon_Fonts'}#SYS_logo{font-family:'SYSLAB_logo_Fonts';font-size:220px;-webkit-transform:rotate(-5deg);width:750px;cursor:default}#SYS_logo:hover{-webkit-transform:scale(1.2,1.2);-moz-transform:scale(1.2,1.2);-ms-transform:scale(1.2,1.2);-o-transform:scale(1.2,1.2);transform:scale(1.2,1.2)}</style></head><body><canvas id="SYS_bg"></canvas><div id="SYS_fps"></div><center id="SYS_notice"><div id="SYS_logo" class="ani">SysLab</div><br/><span></span> 报名已结束,还有意向请邮[email protected]...</center></body><script type="text/javascript">function Ball(a,b){void 0===a&&(a=40),void 0===b&&(b="#ff0000"),this.x=0,this.y=0,this.radius=a,this.vx=0,this.vy=0,this.mass=1,this.rotation=0,this.scaleX=1,this.scaleY=1,this.color=utils.parseColor(b),this.lineWidth=1}function draw_bg(){function j(a,c){var i,j,k,d=c.x-a.x,g=c.y-a.y,h=Math.sqrt(d*d+g*g);e>h&&(i=1-h/e,b.strokeStyle=utils.colorToRGB("#404040",i),b.beginPath(),b.moveTo(a.x,a.y),b.lineTo(c.x,c.y),b.stroke(),j=d*f,k=g*f,a.vx+=j/a.mass,a.vy+=k/a.mass,c.vx-=j/c.mass,c.vy-=k/c.mass)}function k(b,e){b.x+=b.vx,b.y+=b.vy,b.x>a.width?b.x=0:b.x<0&&(b.x=a.width),b.y>a.height?b.y=0:b.y<0&&(b.y=a.height);for(var f,g=e+1;d>g;g++)f=c[g],j(b,f)}function l(a){a.draw(b)}var g,h,i,m,n,o,p,a=document.getElementById("SYS_bg"),b=a.getContext("2d"),c=[],d=50,e=100,f=5e-4;for(a.width=window.innerWidth,a.height=window.innerHeight,i=0;d>i;i++)g=10*Math.random()+2,h=new Ball(g,"#404040"),h.x=Math.random()*a.width,h.y=Math.random()*a.height,h.vx=.5*Math.random()-.25,h.vy=.5*Math.random()-.25,h.mass=20*g,c.push(h);m=Date.now(),n=m,o=0,p=0,function q(){window.requestAnimationFrame(q,a),now=Date.now(),delta=now-m,m=now;var d=(now-n)/1e3;o++,p=Math.floor(o/d),document.getElementById("SYS_fps").innerHTML=p+" fps",b.clearRect(0,0,a.width,a.height),c.forEach(k),c.forEach(l)}()}window.requestAnimationFrame||(window.requestAnimationFrame=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||function(a){return window.setTimeout(a,17)}),window.cancelAnimationFrame||(window.cancelAnimationFrame=window.cancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelAnimationFrame||window.mozCancelRequestAnimationFrame||window.msCancelAnimationFrame||window.msCancelRequestAnimationFrame||window.oCancelAnimationFrame||window.oCancelRequestAnimationFrame||window.clearTimeout),window.utils={},window.utils.captureMouse=function(a){var b={x:0,y:0,event:null},c=document.body.scrollLeft,d=document.documentElement.scrollLeft,e=document.body.scrollTop,f=document.documentElement.scrollTop,g=a.offsetLeft,h=a.offsetTop;return a.addEventListener("mousemove",function(a){var i,j;a.pageX||a.pageY?(i=a.pageX,j=a.pageY):(i=a.clientX+c+d,j=a.clientY+e+f),i-=g,j-=h,b.x=i,b.y=j,b.event=a},!1),b},window.utils.captureTouch=function(a){var b={x:null,y:null,isPressed:!1,event:null},c=document.body.scrollLeft,d=document.documentElement.scrollLeft,e=document.body.scrollTop,f=document.documentElement.scrollTop,g=a.offsetLeft,h=a.offsetTop;return a.addEventListener("touchstart",function(a){b.isPressed=!0,b.event=a},!1),a.addEventListener("touchend",function(a){b.isPressed=!1,b.x=null,b.y=null,b.event=a},!1),a.addEventListener("touchmove",function(a){var i,j,k=a.touches[0];k.pageX||k.pageY?(i=k.pageX,j=k.pageY):(i=k.clientX+c+d,j=k.clientY+e+f),i-=g,j-=h,b.x=i,b.y=j,b.event=a},!1),b},window.utils.parseColor=function(a,b){return b===!0?"number"==typeof a?0|a:("string"==typeof a&&"#"===a[0]&&(a=a.slice(1)),window.parseInt(a,16)):("number"==typeof a&&(a="#"+("00000"+(0|a).toString(16)).substr(-6)),a)},window.utils.colorToRGB=function(a,b){"string"==typeof a&&"#"===a[0]&&(a=window.parseInt(a.slice(1),16)),b=void 0===b?1:b;var c=255&a>>16,d=255&a>>8,e=255&a,f=0>b?0:b>1?1:b;return 1===f?"rgb("+c+","+d+","+e+")":"rgba("+c+","+d+","+e+","+f+")"},window.utils.containsPoint=function(a,b,c){return!(b<a.x||b>a.x+a.width||c<a.y||c>a.y+a.height)},window.utils.intersects=function(a,b){return!(a.x+a.width<b.x||b.x+b.width<a.x||a.y+a.height<b.y||b.y+b.height<a.y)},Ball.prototype.draw=function(a){a.save(),a.translate(this.x,this.y),a.rotate(this.rotation),a.scale(this.scaleX,this.scaleY),a.lineWidth=this.lineWidth,a.fillStyle=this.color,a.beginPath(),a.arc(0,0,this.radius,0,2*Math.PI,!0),a.closePath(),a.fill(),this.lineWidth>0&&a.stroke(),a.restore()},Ball.prototype.getBounds=function(){return{x:this.x-this.radius,y:this.y-this.radius,width:2*this.radius,height:2*this.radius}},window.onload=function(){draw_bg(),document.getElementById("SYS_bg").style.opacity=1};</script></html>