Skip to content

Instantly share code, notes, and snippets.

@halvves
Created August 6, 2019 04:59
Show Gist options
  • Save halvves/fddf1295fde32ad4a1f415b82ccdd9cb to your computer and use it in GitHub Desktop.
Save halvves/fddf1295fde32ad4a1f415b82ccdd9cb to your computer and use it in GitHub Desktop.
(function(){var m=21*Math.random()+30,b=document.createElement("span"),g=[],a=document.createElement("div"),c=window.innerHeight,e=window.innerWidth;b.style.fontSize="60px";b.textContent="\ud83d\udc17";b.style.position="absolute";a.style.position="fixed";a.style.left=a.style.right=0;a.style.height="100vh";a.style.width="100vw";a.style.overflow="hidden";a.style.zIndex=2147483647;a.style.background='rgba(0,0,0,0.6)';document.body.appendChild(a);for(var h=0;h<m;h++){var f=b.cloneNode(!0);f.r=Math.random();g.push(f);a.appendChild(f)}(function n(k){g.forEach(function(d,l){d.style.transform="translate("+(e-(k+1E3*l*d.r)/2%(e+64))+"px,"+(c-Math.sin(k/100-100*l*d.r)*c/8-c/8*d.r)+"px)"});requestAnimationFrame(n)})();window.addEventListener("resize",function(){c=window.innerHeight;e=window.innerWidth})})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment