Advertisement
BrU32

JS FIll Logo SRC

Dec 19th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <body bgcolor="#000000" onload="setInterval('t();',0.3)"/>
  2. <center>
  3. <canvas id="canvas" width="500" height="500" style="border:4px; background-color:black"></canvas>
  4. <script>
  5. function t(){
  6. var canvas = document.querySelector('#canvas').getContext('2d'),side = 0,
  7. size = 100,
  8. x = 100,
  9. y = 100;
  10.  
  11. canvas.beginPath();
  12. canvas.moveTo(x + size * Math.cos(0), y + size * Math.sin(0));
  13.  
  14. for (side; side < 14+1; side++) {
  15. canvas.lineTo(x+Math.floor(Math.random()*4) + size * Math.cos(side * 6 * Math.PI / 4), y + size * Math.sin(side * 8 * Math.PI / 14));
  16. }
  17.  
  18. canvas.fillStyle = "#0FF333";
  19. canvas.fill();
  20. canvas.draw();
  21. }
  22. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement