Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>var w=350,h=350,e=80,i=0,p=2*Math.PI,o=["red","green","yellow"],c=document.createElement('canvas'),x=c.getContext('2d'),r=1;c.id="rasta";c.style.position='absolute';c.style.left="0px";c.style.top="340px";c.width=w;c.height=h;document.body.appendChild(c);function v(){x.beginPath();x.arc(0,350,r++,0,p,0);x.fillStyle=o[i];x.fill();x.stroke();if(r>=350){r=0;e=80;i++;if(i>2){i=0;}}setTimeout(()=>{requestAnimationFrame(v)},100);}v();</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement