"use strict";(self.webpackChunkcnblogs_theme_simplememory_2_2_12=self.webpackChunkcnblogs_theme_simplememory_2_2_12||[]).push([[77],{5077:function(t,e,n){function i(t){let e,n=new Image;n.src=t.img;let i=t.size;function s(t,e,n,i,s){this.x=t,this.y=e,this.s=n,this.r=i,this.fn=s}function r(t){let e,n;switch(t){case"x":e=Math.random()*window.innerWidth;break;case"y":e=Math.random()*window.innerHeight;break;case"s":e=Math.random();break;case"r":e=6*Math.random();break;case"fnx":n=-.5+Math.random(),e=function(t,e){return t+.5*n-1.7};break;case"fny":n=1.5+.7*Math.random(),e=function(t,e){return e+n};break;case"fnr":n=.03*Math.random(),e=function(t){return t+n}}return e}s.prototype.draw=function(t){t.save(),t.translate(this.x,this.y),t.rotate(this.r),t.drawImage(n,0,0,i*this.s,i*this.s),t.restore()},s.prototype.update=function(){this.x=this.fn.x(this.x,this.y),this.y=this.fn.y(this.y,this.y),this.r=this.fn.r(this.r),(this.x>window.innerWidth||this.x<0||this.y>window.innerHeight||this.y<0)&&(this.r=r("fnr"),Math.random()>.4?(this.x=r("x"),this.y=0,this.s=r("s"),this.r=r("r")):(this.x=window.innerWidth,this.y=r("y"),this.s=r("s"),this.r=r("r")))},e=function(){this.list=[]},e.prototype.push=function(t){this.list.push(t)},e.prototype.update=function(){for(let t=0,e=this.list.length;t<e;t++)this.list[t].update()},e.prototype.draw=function(t){for(let e=0,n=this.list.length;e<n;e++)this.list[e].draw(t)},e.prototype.get=function(t){return this.list[t]},e.prototype.size=function(){return this.list.length},n.onload=function(){!function(){requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame;let t,n=document.createElement("canvas");n.height=window.innerHeight,n.width=window.innerWidth,n.setAttribute("style","position: fixed;left: 0;top: 0;pointer-events: none;"),n.setAttribute("id","canvas_sakura"),n.style.zIndex="999999999999999999999999999999999999999999",document.getElementsByTagName("body")[0].appendChild(n),t=n.getContext("2d");let i=new e;for(let e=0;e<50;e++){let e,n,o,a,h,u,d,m;n=r("x"),o=r("y"),h=r("r"),a=r("s"),u=r("fnx"),d=r("fny"),m=r("fnr"),e=new s(n,o,a,h,{x:u,y:d,r:m}),e.draw(t),i.push(e)}requestAnimationFrame((function e(){t.clearRect(0,0,n.width,n.height),i.update(),i.draw(t),requestAnimationFrame(e)}))}()}}n.r(e),n.d(e,{default:function(){return i}})}}]);