Created
January 21, 2020 02:36
-
-
Save LeetCodes/b8d3b94bfe7b7d9d3caba6b6285420d6 to your computer and use it in GitHub Desktop.
BaBrdOP
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
const c = ((x=document.createElement('canvas').getContext('2d')),x.canvas), | |
{ sin:S, cos:C, tan:T } = Math, | |
time = frame = 0, | |
l = u => (loop = now => {animationFrameHandle=requestAnimationFrame(loop);then=(!!then?then:now)+ -now;((now+then)>(1000/60))?u((frame++)/60):u(then);},loop()), | |
drawApp = u => (typeof animationFrameHandle == "undefined")&&((then = window.performance.now()),(startTime=then),l(u)); | |
( c.width = (window.innerWidth*(6/8)|0), c.height = (window.innerWidth*(6/8)|0)*(6/10.66)|0, document.body.append(c) ), | |
( drawApp(function(t){for(c.width|=i=13;i--;x[i&1?'clearRect':'fillRect'](-4,-4,8,8,x.setTransform(a=S(r=r<0?0:r>2?1:r/2)*i*8,b=C(r)*i*8,-b,a,960,540)))r=S(t/3*(13-i))*3+1}) ) | |
// const l=(u=>(loop=now=>{animationFrameHandle=requestAnimationFrame(loop);then=(!!then?then:now)+ -now;((now+then)>(1000/60))?u((frame++)/60):u(then);},loop())), | |
// drawApp=u=>(typeof animationFrameHandle == "undefined")&&((then = window.performance.now()),(startTime=then),l(u)); | |
/*drawApp(function(t){for(c.width|=i=13;i--;x[i&1?'clearRect':'fillRect'](-4,-4,8,8,x.setTransform(a=S(r=r<0?0:r>2?1:r/2)*i*8,b=C(r)*i*8,-b,a,960,540)))r=S(t/3*(13-i))*3+1})*/ |
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
html,body{ | |
margin:0; | |
overflow:hidden; | |
background:#fff; | |
} | |
canvas{ | |
position:absolute; | |
z-index:11; | |
width:100%; | |
display:block; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment