BrU32

JS Canvas 3D Water Slide SRC

Dec 2nd, 2016
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. <html>
  2. <body onload="setInterval(drawe,28)" background-color="white">
  3. <canvas id="myCanvas" width="1000" height="1000" style="background:black;">
  4. </canvas>
  5. <script>
  6. var ii=10
  7. function drawe(){
  8. var text = "";
  9. var possible = "FABCGDE0123456789";
  10. var canvas = document.getElementById("myCanvas");
  11. var ctx = canvas.getContext("2d");
  12. for(var i=0; i!=6; i++)
  13. text+=possible.charAt(Math.floor(Math.random()*possible.length));
  14. ctx.strokeStyle='#'+text;
  15. ctx.fillStyle="red";
  16. ctx.beginPath();
  17. ctx.arc(250,100+ii,ii++,Math.random()*i+10,Math.PI*180);
  18. ctx.stroke();
  19. text='';
  20. }
  21. </script>
  22. </body>
Advertisement
Add Comment
Please, Sign In to add comment