BrU32

JS CanvasRainbow Horizontal Flash & Scroll SRC FX

Sep 8th, 2016
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. <html>
  2. <body onload="setInterval(drawe,.4)" background-color="white">
  3. <canvas id="myCanvas" width="1000" height="600" style="background:black;">
  4. </canvas>
  5. <script>
  6. var ii=4;
  7. var text='#red';
  8. function drawe(){
  9. ii++;
  10. var text = "";
  11. var possible = "FABCGDE0123456789";
  12. var canvas = document.getElementById("myCanvas");
  13. var ctx = canvas.getContext("2d");
  14. for(var i=0; i!=6; i++)
  15. text+=possible.charAt(Math.floor(Math.random()*possible.length));
  16. ctx.strokeStyle='#'+text;
  17. ctx.fillStyle="#"+text;
  18. var c = document.getElementById("myCanvas");
  19. var ctx = c.getContext("2d");
  20. var cts=c.getContext("2d");
  21. ctx.beginPath();
  22. text='';
  23. ctx.fillRect(0,0,Math.random()*2220,889,Math.random()*1);
  24.  
  25. ctx.fill();
  26. text='FFFFFF';
  27. }
  28. </script>
  29. </body>
Advertisement
Add Comment
Please, Sign In to add comment