BrU32

JS Custom Font Rainbow Scrolling Marquee SRC

Dec 2nd, 2016
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. ​
  2. <body onload="setInterval(drawe,22)" background-color="white">
  3. <canvas id="myCanvas" width="1000" height="1000" style="background:black;">
  4. </canvas>
  5. <script>
  6. var inn=prompt('Enter String:');
  7. var outlen=(inn.length*4);
  8. var ii=outlen;
  9. var CF=prompt("Enter Font Type:")
  10. function drawe(){
  11. var out
  12. ii++;
  13. var text = "";
  14. var possible = "FABCGDE0123456789";
  15. var canvas = document.getElementById("myCanvas");
  16. var ctx = canvas.getContext("2d");
  17. ctx.font="50px "+CF
  18. for(var i=0; i!=6; i++)
  19. text+=possible.charAt(Math.floor(Math.random()*possible.length));
  20. ctx.strokeStyle='#'+text;
  21. ctx.fillStyle="#"+text;
  22. var c = document.getElementById("myCanvas");
  23. var ctx = c.getContext("2d");
  24. ctx.beginPath();
  25. ctx.fillText(inn,ii,100,ii,ii,ii);
  26. text='';
  27. if(outlen<4){
  28.  
  29. }
  30. }
  31. </script>
  32. </body>agraph.</p>
  33.  
  34. </body>
  35. </html>
Advertisement
Add Comment
Please, Sign In to add comment