BrU32

JS Custom Font Rainbow Scrolling Marquee SRC

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