Skip to content

Instantly share code, notes, and snippets.

@LeetCodes
Created August 26, 2021 06:28
Show Gist options
  • Save LeetCodes/a0de4d8f1819b6c6059ef4619b0ee7cb to your computer and use it in GitHub Desktop.
Save LeetCodes/a0de4d8f1819b6c6059ef4619b0ee7cb to your computer and use it in GitHub Desktop.
XWNNbow
const c = document.createElement('canvas'),
x = c.getContext('2d'),
S = Math.sin,
C = Math.cos,
T = Math.tan,
R = (r,g,b,a=1)=>`rgba(${r|0},${g|0},${b|0},${a})`;
window.addEventListener('DOMContentLoaded', e=>{
c.width=c.height=360*3;
c.width+=c.height/3/3*7;
document.body.style='margin:0;overflow:hidden;textAlign:center;';
document.body.appendChild(c);
(function(frameTime){
requestAnimationFrame(arguments.callee);
if(typeof window.u=="function") u(frameTime/1e3);
c.style=`background:#FFF;width:${c.width/c.height>innerWidth/innerHeight?innerWidth:innerHeight*c.width/c.height}px;`;
})();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment