-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwojchan.base.js
1 lines (1 loc) · 2.05 KB
/
wojchan.base.js
1
(()=>{let n=document.createElement("canvas"),i=30,d=(n.id="wojchan",n.width=n.height=2*(i+1),n.style="position:fixed;pointer-events:none;image-rendering:pixelated;z-index:"+Number.MAX_VALUE,document.body.appendChild(n),n.getContext("2d")),o=(d.imageSmoothingEnabled=!1,{x:window.innerWidth/2,y:window.innerHeight/2}),s={...o},t=(window.addEventListener("mousemove",A=>s={x:A.clientX,y:A.clientY}),new Image(3*i,3*i)),l=(t.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaBAMAAADKhlwxAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADr8AAA6/ATgFUyQAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCA1LjEuMWK1UgwAAAC2ZVhJZklJKgAIAAAABQAaAQUAAQAAAEoAAAAbAQUAAQAAAFIAAAAoAQMAAQAAAAMAAAAxAQIAEAAAAFoAAABphwQAAQAAAGoAAAAAAAAAgJMAAOgDAACAkwAA6AMAAFBhaW50Lk5FVCA1LjEuMQADAACQBwAEAAAAMDIzMAGgAwABAAAAAQAAAAWgBAABAAAAlAAAAAAAAAACAAEAAgAEAAAAUjk4AAIABwAEAAAAMDEwMAAAAAAIj8MAz2cLbAAAAB5QTFRFAAAAAAAAAKLoLtkQP0jMa9lle/p1w8PD/v+/////nsJ6AAAAAAF0Uk5TAEDm2GYAAAIjSURBVFjD7Za/btswEId5U9a7ShbYMX0DwU8gQC/gId05lIC3bJm56QkC5G17RzfkndPQFNpsPhgGPt+Pf2yLn+TcpYCcrja6KWI/7k0T9iNMgfZgiHV8G3lfkV+hDyFynQu3UQbHEN9CF16Y37AHZakppPcftY0X9lvS7U+R+cScaruFDn6dIql2Ex08naJX7SbuTZ+EtzRhBzpHzFsiwB7kozERDbNrILlyFcI8D8fj/AkOgjNtZe4j11yv0IxlLhoy13QeXdPSn9M7+sGOhqNPlRxssnKdmwTVUeP/alxUmkghr0Xjanhc1zqa1lUj91YaK8PKv5HGVSFI2LSJPJqlfVL7ZDSK8CbtPIKeKzkwaSJjOrJp654cN4Nt+2MadyBUXdzGvWkK/ehoCtiLQHFSH7RR3BWsUxuYTReL6G6g8DnW4W0U031/K4ZuIzM79Pwai/hayExhm2Jtt5BZXBQPpd3CzOy5w0/swMJP2IF704E3xnzADnSAlL8H9WAWI1GoB8QiyalVXSfeGwb8K7K5BsG5XrJZjGititWKxpqS1nOLVasn/xhZ62jwSc0ta2/G0LMWzrj4ZJDqvYCtuRjdsBgXa00WZaFFnGsNTauRqDJybmpDsxjNWj5ZAyfrSU4nvRSCRWcUbCUr6euHTTR09ex549H0XvsLdqW/4Z652unrLvzDytcb+fH4ZemP9/Z73esr6+GFqzst4Zfn/z33b7L+EeX1zoUJAAAAAElFTkSuQmCC",(A,e)=>{d.drawImage(t,A*i,e*i,i,i,0,0,i,i)}),h=0,w=(d.scale(2,2),()=>{var A=s.x-o.x,e=s.y-o.y,t=Math.sqrt(A*A+e*e),e=Math.atan2(e,A),A=Math.cos(e)<0,a=(d.clearRect(0,0,2*i,2*i),150<t?8:4);n.style.left=o.x-i+"px",n.style.top=o.y-i+"px",l(0,2),l(15<t?3==h||h:1,A),8==a&&l(1+!A,2),15<t&&(h=(h+1)%4,o.x+=Math.cos(e)*a,o.y+=Math.sin(e)*a),setTimeout(()=>requestAnimationFrame(w),70)});t.onload=w})();