You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

2 lines
1.4 KiB

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.evanyou=n()}(this,function(){"use strict";var e=function(){function e(){for(a.clearRect(0,0,r,c),o=[{x:0,y:.7*c+l},{x:0,y:.7*c-l}];o[1].x<r+l;)n(o[0],o[1])}function n(e,n){a.beginPath(),a.moveTo(e.x,e.y),a.lineTo(n.x,n.y);var i=n.x+(2*f()-.25)*l,d=t(n.y);a.lineTo(i,d),a.closePath(),s-=v/-50,a.fillStyle="#"+(127*y(s)+128<<16|127*y(s+v/3)+128<<8|127*y(s+v/3*2)+128).toString(16),a.fill(),o[0]=o[1],o[1]={x:i,y:d}}function t(e){var n=e+(2*f()-1.1)*l;return n>c||n<0?t(e):n}var o,i=document.getElementById("evanyou-canvas"),a=i.getContext("2d"),d=window.devicePixelRatio||1,r=window.innerWidth,c=window.innerHeight,l=90,u=Math,s=0,v=2*u.PI,y=u.cos,f=u.random;return i.width=r*d,i.height=c*d,a.scale(d,d),a.globalAlpha=.6,e(),e},n=function(){return function(n){var t,o=n.router;o.afterEach(function(n){var o=n.meta&&"landing"===n.meta.name;if(o){var i=document.createElement("canvas");i.id="evanyou-canvas",i.style.position="absolute",i.style.top=0,i.style.left=0,i.style.zIndex=0,i.style.width="100%",i.style.width="100%",i.style.pointerEvents="none",document.body.appendChild(i),t=e(),document.addEventListener("click",t)}else{var a=document.getElementById("evanyou-canvas");a&&a.parentNode.removeChild(a),t&&(document.removeEventListener("click",t),t=void 0)}})}};return n});
//# sourceMappingURL=evanyou.min.js.map