Created
August 26, 2021 05:32
-
-
Save LeetCodes/6b0d381ab9b073d888087f375c929d66 to your computer and use it in GitHub Desktop.
MWydrVM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <canvas id=c width=1920 height=1080> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function u(t) { | |
| c.width|=E=20; | |
| T=47; | |
| for(i=235;i--;x.fillRect(E*(i%T-E)*S(3*t)+900,E*(E+i/T|0),("ŏͽǷǟ¸ªHėĕDZćĢ!́£ğ̐ė".charCodeAt(i/10)>>i%10&1)*E,E)); | |
| } | |
| let x = c.getContext('2d'); | |
| let S = Math.sin; | |
| let C = Math.cos; | |
| let T = Math.tan; | |
| let R = (r,g,b,a=1) => `rgba(${r|0},${g|0},${b|0},${a})`; | |
| let loop = (frameTime) => | |
| { | |
| requestAnimationFrame(loop); | |
| u(frameTime/1e3); | |
| const aspect = 1920/1080; | |
| const width = aspect > innerWidth/innerHeight? innerWidth : innerHeight*aspect; | |
| c.style.width = width +'px'; | |
| document.body.style.textAlign = 'center'; | |
| } | |
| loop(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { margin:0; overflow:hidden; } | |
| canvas { background:#FFF; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment