BrU32

JS Canvas Wall Of 3D Rainbow Energy Zombies Walking SRC V1

Sep 7th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. <html>
  2. <body onload="setInterval(drawe,100)" bgcolor="black">
  3. <canvas id="myCanvas" width="300" height="500" style="background:black;">
  4. </canvas>
  5. <script>
  6. var ii=1;
  7. function drawe(){
  8. ii++;
  9. var text = "";
  10. var possible = "FABCGDE0123456789";
  11. var canvas = document.getElementById("myCanvas");
  12. var ctx = canvas.getContext("2d");
  13. for(var i=0; i!=6; i++)
  14. text+=possible.charAt(Math.floor(Math.random()*possible.length));
  15. ctx.strokeStyle='#'+text;
  16. ctx.fillStyle="#"+text;
  17. var c = document.getElementById("myCanvas");
  18. var ctx = c.getContext("2d");
  19. var cts=c.getContext("2d");
  20. ctx.beginPath();
  21. ctx.fillRect(Math.floor(Math.random()*10),0,Math.random()*10,Math.random()*ii++,Math.random()*ii--);
  22. ctx.fillRect(Math.floor(Math.random()*20),0,Math.random()*10,Math.random()*ii++,Math.random()*ii--);
  23. ctx.fillRect(Math.floor(Math.random()*30),0,Math.random()*10,Math.random()*ii++,Math.random()*ii--);
  24. ctx.fillRect(Math.floor(Math.random()*40),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  25. ctx.fillRect(Math.floor(Math.random()*50),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  26. ctx.fillRect(Math.floor(Math.random()*60),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  27. ctx.fillRect(Math.floor(Math.random()*70),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  28. ctx.fillRect(Math.floor(Math.random()*80),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  29. ctx.fillRect(Math.floor(Math.random()*90),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  30. ctx.fillRect(Math.floor(Math.random()*100),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  31. ctx.fillRect(Math.floor(Math.random()*110),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  32. ctx.fillRect(Math.floor(Math.random()*120),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  33. ctx.fillRect(Math.floor(Math.random()*130),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  34. ctx.fillRect(Math.floor(Math.random()*140),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  35. ctx.fillRect(Math.floor(Math.random()*150),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  36. ctx.fillRect(Math.floor(Math.random()*160),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  37. ctx.fillRect(Math.floor(Math.random()*170),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  38. ctx.fillRect(Math.floor(Math.random()*180),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  39. ctx.fillRect(Math.floor(Math.random()*190),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  40. ctx.fillRect(Math.floor(Math.random()*200),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  41. ctx.fillRect(Math.floor(Math.random()*210),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  42. ctx.fillRect(Math.floor(Math.random()*220),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  43. ctx.fillRect(Math.floor(Math.random()*230),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  44. ctx.fillRect(Math.floor(Math.random()*240),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  45. ctx.fillRect(Math.floor(Math.random()*250),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  46. ctx.fillRect(Math.floor(Math.random()*260),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  47. ctx.fillRect(Math.floor(Math.random()*270),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  48. ctx.fillRect(Math.floor(Math.random()*280),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  49. ctx.fillRect(Math.floor(Math.random()*290),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  50. ctx.fillRect(Math.floor(Math.random()*300),0,Math.random()*10,Math.random()*ii,Math.random()*ii);
  51. ctx.fill();
  52. text='';
  53. }
  54. </script>
  55. </body>
Advertisement
Add Comment
Please, Sign In to add comment