gluster-web-interface/app/assets/javascripts/js/skycons/skycons.min.js

2 lines
7.9 KiB
JavaScript
Raw Normal View History

2016-08-19 15:22:36 +00:00
!function(t){"use strict";function n(t,n,i,e){t.beginPath(),t.arc(n,i,e,0,p,!1),t.fill()}function i(t,n,i,e,a){t.beginPath(),t.moveTo(n,i),t.lineTo(e,a),t.stroke()}function e(t,i,e,a,o,r,l,s){var h=Math.cos(i*p),c=Math.sin(i*p);s-=l,n(t,e-c*o,a+h*r+.5*s,l+(1-.5*h)*s)}function a(t,n,i,a,o,r,l,s){var h;for(h=5;h--;)e(t,n+h/5,i,a,o,r,l,s)}function o(t,n,i,e,o,r,l){n/=3e4;var s=.21*o,h=.12*o,c=.24*o,u=.28*o;t.fillStyle=l,a(t,n,i,e,s,h,c,u),t.globalCompositeOperation="destination-out",a(t,n,i,e,s,h,c-r,u-r),t.globalCompositeOperation="source-over"}function r(t,n,e,a,o,r,l){n/=12e4;var s,h,c,u,v=.25*o-.5*r,f=.32*o+.5*r,d=.5*o-.5*r;for(t.strokeStyle=l,t.lineWidth=r,t.lineCap="round",t.lineJoin="round",t.beginPath(),t.arc(e,a,v,0,p,!1),t.stroke(),s=8;s--;)h=(n+s/8)*p,c=Math.cos(h),u=Math.sin(h),i(t,e+c*f,a+u*f,e+c*d,a+u*d)}function l(t,n,i,e,a,o,r){n/=15e3;var l=.29*a-.5*o,s=.05*a,h=Math.cos(n*p),c=h*p/-16;t.strokeStyle=r,t.lineWidth=o,t.lineCap="round",t.lineJoin="round",i+=h*s,t.beginPath(),t.arc(i,e,l,c+p/8,c+7*p/8,!1),t.arc(i+Math.cos(c)*l*w,e+Math.sin(c)*l*w,l,c+5*p/8,c+3*p/8,!0),t.closePath(),t.stroke()}function s(t,n,i,e,a,o,r){n/=1350;var l,s,h,c,u=.16*a,v=11*p/12,f=7*p/12;for(t.fillStyle=r,l=4;l--;)s=(n+l/4)%1,h=i+(l-1.5)/1.5*(1===l||2===l?-1:1)*u,c=e+s*s*a,t.beginPath(),t.moveTo(h,c-1.5*o),t.arc(h,c,.75*o,v,f,!1),t.fill()}function h(t,n,e,a,o,r,l){n/=750;var s,h,c,u,v=.1875*o;for(t.strokeStyle=l,t.lineWidth=.5*r,t.lineCap="round",t.lineJoin="round",s=4;s--;)h=(n+s/4)%1,c=Math.floor(e+(s-1.5)/1.5*(1===s||2===s?-1:1)*v)+.5,u=a+h*o,i(t,c,u-1.5*r,c,u+1.5*r)}function c(t,n,e,a,o,r,l){n/=3e3;var s,h,c,u,v=.16*o,f=.75*r,d=n*p*.7,m=Math.cos(d)*f,g=Math.sin(d)*f,M=d+p/3,w=Math.cos(M)*f,C=Math.sin(M)*f,y=d+2*p/3,b=Math.cos(y)*f,k=Math.sin(y)*f;for(t.strokeStyle=l,t.lineWidth=.5*r,t.lineCap="round",t.lineJoin="round",s=4;s--;)h=(n+s/4)%1,c=e+Math.sin((h+s/4)*p)*v,u=a+h*o,i(t,c-m,u-g,c+m,u+g),i(t,c-w,u-C,c+w,u+C),i(t,c-b,u-k,c+b,u+k)}function u(t,n,i,e,o,r,l){n/=3e4;var s=.21*o,h=.06*o,c=.21*o,u=.28*o;t.fillStyle=l,a(t,n,i,e,s,h,c,u),t.globalCompositeOperation="destination-out",a(t,n,i,e,s,h,c-r,u-r),t.globalCompositeOperation="source-over"}function v(t,n,i,e,a,o,r){var l=a/8,s=l/3,h=2*s,c=n%1*p,u=Math.cos(c),v=Math.sin(c);t.fillStyle=r,t.strokeStyle=r,t.lineWidth=o,t.lineCap="round",t.lineJoin="round",t.beginPath(),t.arc(i,e,l,c,c+Math.PI,!1),t.arc(i-s*u,e-s*v,h,c+Math.PI,c,!1),t.arc(i+h*u,e+h*v,s,c+Math.PI,c,!0),t.globalCompositeOperation="destination-out",t.fill(),t.globalCompositeOperation="source-over",t.stroke()}function f(t,n,i,e,a,o,r,l,s){n/=2500;var h,c,u,f,d=C[r],m=(n+r-y[r].start)%l,g=(n+r-y[r].end)%l,M=(n+r)%l;if(t.strokeStyle=s,t.lineWidth=o,t.lineCap="round",t.lineJoin="round",1>m){if(t.beginPath(),m*=d.length/2-1,h=Math.floor(m),m-=h,h*=2,h+=2,t.moveTo(i+(d[h-2]*(1-m)+d[h]*m)*a,e+(d[h-1]*(1-m)+d[h+1]*m)*a),1>g){for(g*=d.length/2-1,c=Math.floor(g),g-=c,c*=2,c+=2,f=h;f!==c;f+=2)t.lineTo(i+d[f]*a,e+d[f+1]*a);t.lineTo(i+(d[c-2]*(1-g)+d[c]*g)*a,e+(d[c-1]*(1-g)+d[c+1]*g)*a)}else for(f=h;f!==d.length;f+=2)t.lineTo(i+d[f]*a,e+d[f+1]*a);t.stroke()}else if(1>g){for(t.beginPath(),g*=d.length/2-1,c=Math.floor(g),g-=c,c*=2,c+=2,t.moveTo(i+d[0]*a,e+d[1]*a),f=2;f!==c;f+=2)t.lineTo(i+d[f]*a,e+d[f+1]*a);t.lineTo(i+(d[c-2]*(1-g)+d[c]*g)*a,e+(d[c-1]*(1-g)+d[c+1]*g)*a),t.stroke()}1>M&&(M*=d.length/2-1,u=Math.floor(M),M-=u,u*=2,u+=2,v(t,n,i+(d[u-2]*(1-M)+d[u]*M)*a,e+(d[u-1]*(1-M)+d[u+1]*M)*a,a,o,s))}var d,m;!function(){var n=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame,i=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||t.msCancelAnimationFrame;n&&i?(d=function(t){function i(){e.value=n(i),t()}var e={value:null};return i(),e},m=function(t){i(t.value)}):(d=setInterval,m=clearInterval)}();var g=500,M=.08,p=2*Math.PI,w=2/Math.sqrt(2),C=[[-.75,-.18,-.7219,-.1527,-.6971,-.1225,-.6739,-.091,-.6516,-.0588,-.6298,-.0262,-.6083,.0065,-.5868,.0396,-.5643,.0731,-.5372,.1041,-.5033,.1259,-.4662,.1406,-