No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

2 líneas
24 KiB

  1. function w(c){var v=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;c=c.replace(v,function(e,t,i,a){return t+t+i+i+a+a});var l=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(c);return l?{r:parseInt(l[1],16),g:parseInt(l[2],16),b:parseInt(l[3],16)}:null}function A(c,v,l){return Math.min(Math.max(c,v),l)}function y(c,v){return v.indexOf(c)>-1}var F=function(c,v){var l=document.querySelector("#"+c+" > .particles-js-canvas-el");this.pJS={canvas:{el:l,w:l.offsetWidth,h:l.offsetHeight},particles:{number:{value:400,density:{enable:!0,value_area:800}},color:{value:"#fff"},shape:{type:"circle",stroke:{width:0,color:"#ff0000"},polygon:{nb_sides:5},image:{src:"",width:100,height:100}},opacity:{value:1,random:!1,anim:{enable:!1,speed:2,opacity_min:0,sync:!1}},size:{value:20,random:!1,anim:{enable:!1,speed:20,size_min:0,sync:!1}},line_linked:{enable:!0,distance:100,color:"#fff",opacity:1,width:1},move:{enable:!0,speed:2,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:3e3,rotateY:3e3}},array:[]},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:100,line_linked:{opacity:1}},bubble:{distance:200,size:80,duration:.4},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}},mouse:{}},retina_detect:!1,fn:{interact:{},modes:{},vendors:{}},tmp:{}};var e=this.pJS;v&&Object.deepExtend(e,v),e.tmp.obj={size_value:e.particles.size.value,size_anim_speed:e.particles.size.anim.speed,move_speed:e.particles.move.speed,line_linked_distance:e.particles.line_linked.distance,line_linked_width:e.particles.line_linked.width,mode_grab_distance:e.interactivity.modes.grab.distance,mode_bubble_distance:e.interactivity.modes.bubble.distance,mode_bubble_size:e.interactivity.modes.bubble.size,mode_repulse_distance:e.interactivity.modes.repulse.distance},e.fn.retinaInit=function(){e.retina_detect&&window.devicePixelRatio>1?(e.canvas.pxratio=window.devicePixelRatio,e.tmp.retina=!0):(e.canvas.pxratio=1,e.tmp.retina=!1),e.canvas.w=e.canvas.el.offsetWidth*e.canvas.pxratio,e.canvas.h=e.canvas.el.offsetHeight*e.canvas.pxratio,e.particles.size.value=e.tmp.obj.size_value*e.canvas.pxratio,e.particles.size.anim.speed=e.tmp.obj.size_anim_speed*e.canvas.pxratio,e.particles.move.speed=e.tmp.obj.move_speed*e.canvas.pxratio,e.particles.line_linked.distance=e.tmp.obj.line_linked_distance*e.canvas.pxratio,e.interactivity.modes.grab.distance=e.tmp.obj.mode_grab_distance*e.canvas.pxratio,e.interactivity.modes.bubble.distance=e.tmp.obj.mode_bubble_distance*e.canvas.pxratio,e.particles.line_linked.width=e.tmp.obj.line_linked_width*e.canvas.pxratio,e.interactivity.modes.bubble.size=e.tmp.obj.mode_bubble_size*e.canvas.pxratio,e.interactivity.modes.repulse.distance=e.tmp.obj.mode_repulse_distance*e.canvas.pxratio},e.fn.canvasInit=function(){e.canvas.ctx=e.canvas.el.getContext("2d")},e.fn.canvasSize=function(){e.canvas.el.width=e.canvas.w,e.canvas.el.height=e.canvas.h,e&&e.interactivity.events.resize&&window.addEventListener("resize",function(){e.canvas.w=e.canvas.el.offsetWidth,e.canvas.h=e.canvas.el.offsetHeight,e.tmp.retina&&(e.canvas.w*=e.canvas.pxratio,e.canvas.h*=e.canvas.pxratio),e.canvas.el.width=e.canvas.w,e.canvas.el.height=e.canvas.h,e.particles.move.enable||(e.fn.particlesEmpty(),e.fn.particlesCreate(),e.fn.particlesDraw(),e.fn.vendors.densityAutoParticles()),e.fn.vendors.densityAutoParticles()})},e.fn.canvasPaint=function(){e.canvas.ctx.fillRect(0,0,e.canvas.w,e.canvas.h)},e.fn.canvasClear=function(){e.canvas.ctx.clearRect(0,0,e.canvas.w,e.canvas.h)},e.fn.particle=function(t,i,a){if(this.radius=(e.particles.size.random?Math.random():1)*e.particles.size.value,e.particles.size.anim.enable&&(this.size_status=!1,this.vs=e.particles.size.anim.speed/100,e.particles.size.anim.sync||(this.vs=this.vs*Math.random())),this.x=a?a.x:Math.random()*e.canvas.w,this.y=a?a.y:Math.random()*e.canvas.h,this.x>e.canvas.w-2*this.radius?this.x=this.x-this.radius:this.x<2*this.radius&&(this.x=this.x+this.radius),this.y>e.canvas.h-2*this.radius?this.y=this.y-this.radius:this.y<2*this.radius&&(this.y=this.y+this.radius),e.particles.move.bounce&&e.fn.vendors.checkOverlap(this,a),this.color={},typeof t.value=="object")if(t.value instanceof Array){var n=t.value[Math.floor(Math.random()*e.particles.color.value.length)];this.color.rgb=w(n)}else t.value.r!=null&&t.value.g!=null&&t.value.b!=null&&(this.color.rgb={r:t.value.r,g:t.value.g,b:t.value.b}),t.value.h!=null&&t.value.s!=null&&t.value.l!=null&&(this.color.hsl={h:t.value.h,s:t.value.s,l:t.value.l});else t.value=="random"?this.color.rgb={r:Math.floor(256*Math.random())+0,g:Math.floor(256*Math.random())+0,b:Math.floor(256*Math.random())+0}:typeof t.value=="string"&&(this.color=t,this.color.rgb=w(this.color.value));this.opacity=(e.particles.opacity.random?Math.random():1)*e.particles.opacity.value,e.particles.opacity.anim.enable&&(this.opacity_status=!1,this.vo=e.particles.opacity.anim.speed/100,e.particles.opacity.anim.sync||(this.vo=this.vo*Math.random()));var s={};switch(e.particles.move.direction){case"top":s={x:0,y:-1};break;case"top-right":s={x:.5,y:-.5};break;case"right":s={x:1,y:-0};break;case"bottom-right":s={x:.5,y:.5};break;case"bottom":s={x:0,y:1};break;case"bottom-left":s={x:-.5,y:1};break;case"left":s={x:-1,y:0};break;case"top-left":s={x:-.5,y:-.5};break;default:s={x:0,y:0}}e.particles.move.straight?(this.vx=s.x,this.vy=s.y,e.particles.move.random&&(this.vx=this.vx*Math.random(),this.vy=this.vy*Math.random())):(this.vx=s.x+Math.random()-.5,this.vy=s.y+Math.random()-.5),this.vx_i=this.vx,this.vy_i=this.vy;var r=e.particles.shape.type;if(typeof r=="object"){if(r instanceof Array){var o=r[Math.floor(Math.random()*r.length)];this.shape=o}}else this.shape=r;if(this.shape=="image"){var d=e.particles.shape;this.img={src:d.image.src,ratio:d.image.width/d.image.height},this.img.ratio||(this.img.ratio=1),e.tmp.img_type=="svg"&&e.tmp.source_svg!=null&&(e.fn.vendors.createSvgImg(this),e.tmp.pushing&&(this.img.loaded=!1))}},e.fn.particle.prototype.draw=function(){function t(){e.canvas.ctx.drawImage(r,i.x-a,i.y-a,2*a,2*a/i.img.ratio)}var i=this;if(i.radius_bubble!=null)var a=i.radius_bubble;else var a=i.radius;if(i.opacity_bubble!=null)var n=i.opacity_bubble;else var n=i.opacity;if(i.color.rgb)var s="rgba("+i.color.rgb.r+","+i.color.rgb.g+","+i.color.rgb.b+","+n+")";else var s="hsla("+i.color.hsl.h+","+i.color.hsl.s+"%,"+i.color.hsl.l+"%,"+n+")";switch(e.canvas.ctx.fillStyle=s,e.canvas.ctx.beginPath(),i.shape){case"circle":e.canvas.ctx.arc(i.x,i.y,a,0,2*Math.PI,!1);break;case"edge":e.canvas.ctx.rect(i.x-a,i.y-a,2*a,2*a);break;case"triangle":e.fn.vendors.drawShape(e.canvas.ctx,i.x-a,i.y+a/1.66,2*a,3,2);break;case"polygon":e.fn.vendors.drawShape(e.canvas.ctx,i.x-a/(e.particles.shape.polygon.nb_sides/3.5),i.y-a/.76,2.66*a/(e.particles.shape.polygon.nb_sides/3),e.particles.shape.polygon.nb_sides,1);break;case"star":e.fn.vendors.drawShape(e.canvas.ctx,i.x-2*a/(e.particles.shape.polygon.nb_sides/4),i.y-a/1.52,2*a*2.66/(e.particles.shape.polygon.nb_sides/3),e.particles.shape.polygon.nb_sides,2);break;case"image":if(e.tmp.img_type=="svg")var r=i.img.obj;else var r=e.tmp.img_obj;r&&t()}e.canvas.ctx.closePath(),e.particles.shape.stroke.width>0&&(e.canvas.ctx.strokeStyle=e.particles.shape.stroke.color,e.canvas.ctx.lineWidth=e.particles.shape.stroke.width,e.canvas.ctx.stroke()),e.canvas.ctx.fill()},e.fn.particlesCreate=function(){for(var t=0;t<e.particles.number.value;t++)e.particles.array.push(new e.fn.particle(e.particles.color,e.particles.opacity.value))},e.fn.particlesUpdate=function(){for(var t=0;t<e.particles.array.length;t++){var i=e.particles.array[t];if(e.particles.move.enable){var a=e.particles.move.speed/2;i.x+=i.vx*a,i.y+=i.vy*a}if(e.particles.opacity.anim.enable&&(i.opacity_status==1?(i.opacity>=e.particles.opacity.value&&(i.opacity_status=!1),i.opacity+=i.vo):(i.opacity<=e.particles.opacity.anim.opacity_min&&(i.opacity_status=!0),i.opacity-=i.vo),i.opacity<0&&(i.opacity=0)),e.particles.size.anim.enable&&(i.size_status==1?(i.radius>=e.particles.size.value&&(i.size_status=!1),i.radius+=i.vs):(i.radius<=e.particles.size.anim.size_min&&(i.size_status=!0),i.radius-=i.vs),i.radius<0&&(i.radius=0)),e.particles.move.out_mode=="bounce")var n={x_left:i.radius,x_right:e.canvas.w,y_top:i.radius,y_bottom:e.canvas.h};else var n={x_left:-i.radius,x_right:e.canvas.w+i.radius,y_top:-i.radius,y_bottom:e.canvas.h+i.radius};switch(i.x-i.radius>e.canvas.w?(i.x=n.x_left,i.y=Math.random()*e.canvas.h):i.x+i.radius<0&&(i.x=n.x_right,i.y=Math.random()*e.canvas.h),i.y-i.radius>e.canvas.h?(i.y=n.y_top,i.x=Math.random()*e.canvas.w):i.y+i.radius<0&&(i.y=n.y_bottom,i.x=Math.random()*e.canvas.w),e.particles.move.out_mode){case"bounce":(i.x+i.radius>e.canvas.w||i.x-i.radius<0)&&(i.vx=-i.vx),(i.y+i.radius>e.canvas.h||i.y-i.radius<0)&&(i.vy=-i.vy)}if(y("grab",e.interactivity.events.onhover.mode)&&e.fn.modes.grabParticle(i),(y("bubble",e.interactivity.events.onhover.mode)||y("bubble",e.interactivity.events.onclick.mode))&&e.fn.modes.bubbleParticle(i),(y("repulse",e.interactivity.events.onhover.mode)||y("repulse",e.interactivity.events.onclick.mode))&&e.fn.modes.repulseParticle(i),e.particles.line_linked.enable||e.particles.move.attract.enable)for(var s=t+1;s<e.particles.array.length;s++){var r=e.particles.array[s];e.particles.line_linked.enable&&e.fn.interact.linkParticles(i,r),e.particles.move.attract.enable&&e.fn.interact.attractParticles(i,r),e.particles.move.bounce&&e.fn.interact.bounceParticles(i,r)}}},e.fn.particlesDraw=function(){e.canvas.ctx.clearRect(0,0,e.canvas.w,e.canvas.h),e.fn.particlesUpdate();for(var t=0;t<e.particles.array.length;t++){var i=e.particles.array[t];i.draw()}},e.fn.particlesEmpty=function(){e.particles.array=[]},e.fn.particlesRefresh=function(){cancelRequestAnimFrame(e.fn.checkAnimFrame),cancelRequestAnimFrame(e.fn.drawAnimFrame),e.tmp.source_svg=void 0,e.tmp.img_obj=void 0,e.tmp.count_svg=0,e.fn.particlesEmpty(),e.fn.canvasClear(),e.fn.vendors.start()},e.fn.interact.linkParticles=function(t,i){var a=t.x-i.x,n=t.y-i.y,s=Math.sqrt(a*a+n*n);if(s<=e.particles.line_linked.distance){var r=e.particles.line_linked.opacity-s/(1/e.particles.line_linked.opacity)/e.particles.line_linked.distance;if(r>0){var o=e.particles.line_linked.color_rgb_line;e.canvas.ctx.strokeStyle="rgba("+o.r+","+o.g+","+o.b+","+r+")",e.canvas.ctx.lineWidth=e.particles.line_linked.width,e.canvas.ctx.beginPath(),e.canvas.ctx.moveTo(t.x,t.y),e.canvas.ctx.lineTo(i.x,i.y),e.canvas.ctx.stroke(),e.canvas.ctx.closePath()}}},e.fn.interact.attractParticles=function(t,i){var a=t.x-i.x,n=t.y-i.y,s=Math.sqrt(a*a+n*n);if(s<=e.particles.line_linked.distance){var r=a/(1e3*e.particles.move.attract.rotateX),o=n/(1e3*e.particles.move.attract.rotateY);t.vx-=r,t.vy-=o,i.vx+=r,i.vy+=o}},e.fn.interact.bounceParticles=function(t,i){var a=t.x-i.x,n=t.y-i.y,s=Math.sqrt(a*a+n*n),r=t.radius+i.radius;r>=s&&(t.vx=-t.vx,t.vy=-t.vy,i.vx=-i.vx,i.vy=-i.vy)},e.fn.modes.pushParticles=function(t,i){e.tmp.pushing=!0;for(var a=0;t>a;a++)e.particles.array.push(new e.fn.particle(e.particles.color,e.particles.opacity.value,{x:i?i.pos_x:Math.random()*e.canvas.w,y:i?i.pos_y:Math.random()*e.canvas.h})),a==t-1&&(e.particles.move.enable||e.fn.particlesDraw(),e.tmp.pushing=!1)},e.fn.modes.removeParticles=function(t){e.particles.array.splice(0,t),e.particles.move.enable||e.fn.particlesDraw()},e.fn.modes.bubbleParticle=function(t){function i(){t.opacity_bubble=t.opacity,t.radius_bubble=t.radius}function a(u,_,g,f,b){if(u!=_)if(e.tmp.bubble_duration_end){if(g!=null){var z=f-m*(f-u)/e.interactivity.modes.bubble.duration,M=u-z;x=u+M,b=="size"&&(t.radius_bubble=x),b=="opacity"&&(t.opacity_bubble=x)}}else if(r<=e.interactivity.modes.bubble.distance){if(g!=null)var k=g;else var k=f;if(k!=u){var x=f-m*(f-u)/e.interactivity.modes.bubble.duration;b=="size"&&(t.radius_bubble=x),b=="opacity"&&(t.opacity_bubble=x)}}else b=="size"&&(t.radius_bubble=void 0),b=="opacity"&&(t.opacity_bubble=void 0)}if(e.interactivity.events.onhover.enable&&y("bubble",e.interactivity.events.onhover.mode)){var n=t.x-e.interactivity.mouse.pos_x,s=t.y-e.interactivity.mouse.pos_y,r=Math.sqrt(n*n+s*s),o=1-r/e.interactivity.modes.bubble.distance;if(r<=e.interactivity.modes.bubble.distance){if(o>=0&&e.interactivity.status=="mousemove"){if(e.interactivity.modes.bubble.size!=e.particles.size.value)if(e.interactivity.modes.bubble.size>e.particles.size.value){var d=t.radius+e.interactivity.modes.bubble.size*o;d>=0&&(t.radius_bubble=d)}else{var h=t.radius-e.interactivity.modes.bubble.size,d=t.radius-h*o;d>0?t.radius_bubble=d:t.radius_bubble=0}if(e.interactivity.modes.bubble.opacity!=e.particles.opacity.value)if(e.interactivity.modes.bubble.opacity>e.particles.opacity.value){var p=e.interactivity.modes.bubble.opacity*o;p>t.opacity&&p<=e.interactivity.modes.bubble.opacity&&(t.opacity_bubble=p)}else{var p=t.opacity-(e.particles.opacity.value-e.interactivity.modes.bubble.opacity)*o;p<t.opacity&&p>=e.interactivity.modes.bubble.opacity&&(t.opacity_bubble=p)}}}else i();e.interactivity.status=="mouseleave"&&i()}else if(e.interactivity.events.onclick.enable&&y("bubble",e.interactivity.events.onclick.mode)){if(e.tmp.bubble_clicking){var n=t.x-e.interactivity.mouse.click_pos_x,s=t.y-e.interactivity.mouse.click_pos_y,r=Math.sqrt(n*n+s*s),m=(new Date().getTime()-e.interactivity.mouse.click_time)/1e3;m>e.interactivity.modes.bubble.duration&&(e.tmp.bubble_duration_end=!0),m>2*e.interactivity.modes.bubble.duration&&(e.tmp.bubble_clicking=!1,e.tmp.bubble_duration_end=!1)}e.tmp.bubble_clicking&&(a(e.interactivity.modes.bubble.size,e.particles.size.value,t.radius_bubble,t.radius,"size"),a(e.interactivity.modes.bubble.opacity,e.particles.opacity.value,t.opacity_bubble,t.opacity,"opacity"))}},e.fn.modes.repulseParticle=function(t){function i(){var f=Math.atan2(u,m);if(t.vx=g*Math.cos(f),t.vy=g*Math.sin(f),e.particles.move.out_mode=="bounce"){var b={x:t.x+t.vx,y:t.y+t.vy};(b.x+t.radius>e.canvas.w||b.x-t.radius<0)&&(t.vx=-t.vx),(b.y+t.radius>e.canvas.h||b.y-t.radius<0)&&(t.vy=-t.vy)}}if(e.interactivity.events.onhover.enable&&y("repulse",e.interactivity.events.onhover.mode)&&e.interactivity.status=="mousemove"){var a=t.x-e.interactivity.mouse.pos_x,n=t.y-e.interactivity.mouse.pos_y,s=Math.sqrt(a*a+n*n),r={x:a/s,y:n/s},o=e.interactivity.modes.repulse.distance,d=100,h=A(1/o*(-1*Math.pow(s/o,2)+1)*o*d,0,50),p={x:t.x+r.x*h,y:t.y+r.y*h};e.particles.move.out_mode=="bounce"?(p.x-t.radius>0&&p.x+t.radius<e.canvas.w&&(t.x=p.x),p.y-t.radius>0&&p.y+t.radius<e.canvas.h&&(t.y=p.y)):(t.x=p.x,t.y=p.y)}else if(e.interactivity.events.onclick.enable&&y("repulse",e.interactivity.events.onclick.mode))if(e.tmp.repulse_finish||(e.tmp.repulse_count++,e.tmp.repulse_count==e.particles.array.length&&(e.tmp.repulse_finish=!0)),e.tmp.repulse_clicking){var o=Math.pow(e.interactivity.modes.repulse.distance/6,3),m=e.interactivity.mouse.click_pos_x-t.x,u=e.interactivity.mouse.click_pos_y-t.y,_=m*m+u*u,g=-o/_*1;o>=_&&i()}else e.tmp.repulse_clicking==0&&(t.vx=t.vx_i,t.vy=t.vy_i)},e.fn.modes.grabParticle=function(t){if(e.interactivity.events.onhover.enable&&e.interactivity.status=="mousemove"){var i=t.x-e.interactivity.mouse.pos_x,a=t.y-e.interactivity.mouse.pos_y,n=Math.sqrt(i*i+a*a);if(n<=e.interactivity.modes.grab.distance){var s=e.interactivity.modes.grab.line_linked.opacity-n/(1/e.interactivity.modes.grab.line_linked.opacity)/e.interactivity.modes.grab.distance;if(s>0){var r=e.particles.line_linked.color_rgb_line;e.canvas.ctx.strokeStyle="rgba("+r.r+","+r.g+","+r.b+","+s+")",e.canvas.ctx.lineWidth=e.particles.line_linked.width,e.canvas.ctx.beginPath(),e.canvas.ctx.moveTo(t.x,t.y),e.canvas.ctx.lineTo(e.interactivity.mouse.pos_x,e.interactivity.mouse.pos_y),e.canvas.ctx.stroke(),e.canvas.ctx.closePath()}}}},e.fn.vendors.eventsListeners=function(){e.interactivity.detect_on=="window"?e.interactivity.el=window:e.interactivity.el=e.canvas.el,(e.interactivity.events.onhover.enable||e.interactivity.events.onclick.enable)&&(e.interactivity.el.addEventListener("mousemove",function(t){if(e.interactivity.el==window)var i=t.clientX,a=t.clientY;else var i=t.offsetX||t.clientX,a=t.offsetY||t.clientY;e.interactivity.mouse.pos_x=i,e.interactivity.mouse.pos_y=a,e.tmp.retina&&(e.interactivity.mouse.pos_x*=e.canvas.pxratio,e.interactivity.mouse.pos_y*=e.canvas.pxratio),e.interactivity.status="mousemove"}),e.interactivity.el.addEventListener("mouseleave",function(t){e.interactivity.mouse.pos_x=null,e.interactivity.mouse.pos_y=null,e.interactivity.status="mouseleave"})),e.interactivity.events.onclick.enable&&e.interactivity.el.addEventListener("click",function(){if(e.interactivity.mouse.click_pos_x=e.interactivity.mouse.pos_x,e.interactivity.mouse.click_pos_y=e.interactivity.mouse.pos_y,e.interactivity.mouse.click_time=new Date().getTime(),e.interactivity.events.onclick.enable)switch(e.interactivity.events.onclick.mode){case"push":e.particles.move.enable||e.interactivity.modes.push.particles_nb==1?e.fn.modes.pushParticles(e.interactivity.modes.push.particles_nb,e.interactivity.mouse):e.interactivity.modes.push.particles_nb>1&&e.fn.modes.pushParticles(e.interactivity.modes.push.particles_nb);break;case"remove":e.fn.modes.removeParticles(e.interactivity.modes.remove.particles_nb);break;case"bubble":e.tmp.bubble_clicking=!0;break;case"repulse":e.tmp.repulse_clicking=!0,e.tmp.repulse_count=0,e.tmp.repulse_finish=!1,setTimeout(function(){e.tmp.repulse_clicking=!1},1e3*e.interactivity.modes.repulse.duration)}})},e.fn.vendors.densityAutoParticles=function(){if(e.particles.number.density.enable){var t=e.canvas.el.width*e.canvas.el.height/1e3;e.tmp.retina&&(t/=2*e.canvas.pxratio);var i=t*e.particles.number.value/e.particles.number.density.value_area,a=e.particles.array.length-i;0>a?e.fn.modes.pushParticles(Math.abs(a)):e.fn.modes.removeParticles(a)}},e.fn.vendors.checkOverlap=function(t,i){for(var a=0;a<e.particles.array.length;a++){var n=e.particles.array[a],s=t.x-n.x,r=t.y-n.y,o=Math.sqrt(s*s+r*r);o<=t.radius+n.radius&&(t.x=i?i.x:Math.random()*e.canvas.w,t.y=i?i.y:Math.random()*e.canvas.h,e.fn.vendors.checkOverlap(t))}},e.fn.vendors.createSvgImg=function(t){var i=e.tmp.source_svg,a=/#([0-9A-F]{3,6})/gi,n=i.replace(a,function(h,p,m,u){if(t.color.rgb)var _="rgba("+t.color.rgb.r+","+t.color.rgb.g+","+t.color.rgb.b+","+t.opacity+")";else var _="hsla("+t.color.hsl.h+","+t.color.hsl.s+"%,"+t.color.hsl.l+"%,"+t.opacity+")";return _}),s=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),r=window.URL||window.webkitURL||window,o=r.createObjectURL(s),d=new Image;d.addEventListener("load",function(){t.img.obj=d,t.img.loaded=!0,r.revokeObjectURL(o),e.tmp.count_svg++}),d.src=o},e.fn.vendors.destroypJS=function(){cancelAnimationFrame(e.fn.drawAnimFrame),l.remove(),pJSDom=null},e.fn.vendors.drawShape=function(t,i,a,n,s,r){var o=s*r,d=s/r,h=180*(d-2)/d,p=Math.PI-Math.PI*h/180;t.save(),t.beginPath(),t.translate(i,a),t.moveTo(0,0);for(var m=0;o>m;m++)t.lineTo(n,0),t.translate(n,0),t.rotate(p);t.fill(),t.restore()},e.fn.vendors.exportImg=function(){window.open(e.canvas.el.toDataURL("image/png"),"_blank")},e.fn.vendors.loadImg=function(t){if(e.tmp.img_error=void 0,e.particles.shape.image.src!="")if(t=="svg"){var i=new XMLHttpRequest;i.open("GET",e.particles.shape.image.src),i.onreadystatechange=function(n){i.readyState==4&&(i.status==200?(e.tmp.source_svg=n.currentTarget.response,e.fn.vendors.checkBeforeDraw()):(console.log("Error pJS - Image not found"),e.tmp.img_error=!0))},i.send()}else{var a=new Image;a.addEventListener("load",function(){e.tmp.img_obj=a,e.fn.vendors.checkBeforeDraw()}),a.src=e.particles.shape.image.src}else console.log("Error pJS - No image.src"),e.tmp.img_error=!0},e.fn.vendors.draw=function(){e.particles.shape.type=="image"?e.tmp.img_type=="svg"?e.tmp.count_svg>=e.particles.number.value?(e.fn.particlesDraw(),e.particles.move.enable?e.fn.drawAnimFrame=requestAnimFrame(e.fn.vendors.draw):cancelRequestAnimFrame(e.fn.drawAnimFrame)):e.tmp.img_error||(e.fn.drawAnimFrame=requestAnimFrame(e.fn.vendors.draw)):e.tmp.img_obj!=null?(e.fn.particlesDraw(),e.particles.move.enable?e.fn.drawAnimFrame=requestAnimFrame(e.fn.vendors.draw):cancelRequestAnimFrame(e.fn.drawAnimFrame)):e.tmp.img_error||(e.fn.drawAnimFrame=requestAnimFrame(e.fn.vendors.draw)):(e.fn.particlesDraw(),e.particles.move.enable?e.fn.drawAnimFrame=requestAnimFrame(e.fn.vendors.draw):cancelRequestAnimFrame(e.fn.drawAnimFrame))},e.fn.vendors.checkBeforeDraw=function(){e.particles.shape.type=="image"?e.tmp.img_type=="svg"&&e.tmp.source_svg==null?e.tmp.checkAnimFrame=requestAnimFrame(check):(cancelRequestAnimFrame(e.tmp.checkAnimFrame),e.tmp.img_error||(e.fn.vendors.init(),e.fn.vendors.draw())):(e.fn.vendors.init(),e.fn.vendors.draw())},e.fn.vendors.init=function(){e.fn.retinaInit(),e.fn.canvasInit(),e.fn.canvasSize(),e.fn.canvasPaint(),e.fn.particlesCreate(),e.fn.vendors.densityAutoParticles(),e.particles.line_linked.color_rgb_line=w(e.particles.line_linked.color)},e.fn.vendors.start=function(){y("image",e.particles.shape.type)?(e.tmp.img_type=e.particles.shape.image.src.substr(e.particles.shape.image.src.length-3),e.fn.vendors.loadImg(e.tmp.img_type)):e.fn.vendors.checkBeforeDraw()},e.fn.vendors.eventsListeners(),e.fn.vendors.start()};Object.deepExtend=function(c,v){for(var l in v)v[l]&&v[l].constructor&&v[l].constructor===Object?(c[l]=c[l]||{},arguments.callee(c[l],v[l])):c[l]=v[l];return c},window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(c){window.setTimeout(c,1e3/60)}}(),window.cancelRequestAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout}(),window.pJSDom=[],window.particlesJS=function(c,v){typeof c!="string"&&(v=c,c="particles-js"),c||(c="particles-js");var l=document.getElementById(c),e="particles-js-canvas-el",t=l.getElementsByClassName(e);if(t.length)for(;t.length>0;)l.removeChild(t[0]);var i=document.createElement("canvas");i.className=e,i.style.width="100%",i.style.height="100%";var a=document.getElementById(c).appendChild(i);a!=null&&pJSDom.push(new F(c,v))},window.particlesJS.load=function(c,v,l){var e=new XMLHttpRequest;e.open("GET",v),e.onreadystatechange=function(t){if(e.readyState==4)if(e.status==200){var i=JSON.parse(t.currentTarget.response);window.particlesJS(c,i),l&&l()}else console.log("Error pJS - XMLHttpRequest status: "+e.status),console.log("Error pJS - File config not found")},e.send()};particlesJS("particles-js",{particles:{number:{value:43,density:{enable:!0,value_area:1042.21783956259}},color:{value:"#e6e6e6"},shape:{type:"circle",stroke:{width:0,color:"#000000"},polygon:{nb_sides:5},image:{src:"img/github.svg",width:100,height:100}},opacity:{value:.4734885849793636,random:!1,anim:{enable:!1,speed:1,opacity_min:.1,sync:!1}},size:{value:16.03412060865523,random:!0,anim:{enable:!1,speed:40,size_min:.1,sync:!1}},line_linked:{enable:!1,distance:64.13648243462092,color:"#ffffff",opacity:.4,width:1},move:{enable:!0,speed:1,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:600,rotateY:1200}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!1,mode:"repulse"},onclick:{enable:!1,mode:"push"},resize:!0},modes:{grab:{distance:400,line_linked:{opacity:1}},bubble:{distance:400,size:40,duration:2,opacity:8,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!1});$("#particles-js.particle2").length&&$(window).width()>992&&particlesJS("particles-js",{particles:{number:{value:95,density:{enable:!0,value_area:946.9771699587272}},color:{value:"#ffffff"},shape:{type:"circle",stroke:{width:0,color:"#000000"},polygon:{nb_sides:5},image:{src:"img/github.svg",width:100,height:100}},opacity:{value:.5,random:!1,anim:{enable:!1,speed:1,opacity_min:.1,sync:!1}},size:{value:3,random:!0,anim:{enable:!1,speed:40,size_min:.1,sync:!1}},line_linked:{enable:!0,distance:150,color:"#ffffff",opacity:.4,width:1},move:{enable:!0,speed:6,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:600,rotateY:1200}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!1,mode:"repulse"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:400,line_linked:{opacity:1}},bubble:{distance:400,size:40,duration:2,opacity:8,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!0});