-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminified.html
1 lines (1 loc) · 983 Bytes
/
minified.html
1
<script>(b=(d=document).body=d.createElement("body")).style.overflow="hidden",b.style.margin=0,c=d.createElement("canvas"),b.appendChild(c),t=c.getContext("2d"),w=c.width=window.innerWidth,h=c.height=window.innerHeight,r=(m=Math).random,z=($,_)=>~~(r()*(_-$+1)+$),j=[[248,177,149],[246,114,128],[192,108,132],[108,91,123],[53,92,125]],g=($,_,s)=>{for(p of(q=null,d=1/0,s))(e=m.sqrt((p[0]-$)**2+(p[1]-_)**2))<d&&(q=p,d=e);return[q,d]},gc=($,_,s)=>(l=1-m.min(1,_/s),[$[2][0]*l,$[2][1]*l,$[2][2]*l]),($=>{for(i=0,a=w*h,o=m.sqrt(a)/4,u=[],v=[],f=[],k=[];i<~~(a/2e4*2);i++)u.push([~~(r()*w),~~(r()*h),j[z(0,4)]]);for(i=0;i<a;i++)n=g(x=i%w,y=i/w|0,u),f.push(cp=n[0][0]+""+n[0][1]),(f[i-1]&&f[i-1]!==cp||f[i-w]&&f[i-w]!==cp)&&k.push([x,y]),v.push(...gc(n[0],n[1],o),255);for(t.putImageData(new ImageData(new Uint8ClampedArray(v),w,h),0,0),co="#000",t.fillStyle=co,i=0;i<k.length;i++)t.fillRect(k[i][0],k[i][1],7,7);t.fill(),t.lineWidth=14,t.strokeStyle=co,t.strokeRect(0,0,w,h)})()</script>