Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body bgcolor="#000000" onload="setInterval('t();',0.3)"/>
- <center>
- <canvas id="canvas" width="500" height="500" style="border:4px; background-color:black"></canvas>
- <script>
- function t(){
- var canvas = document.querySelector('#canvas').getContext('2d'),side = 0,
- size = 100,
- x = 100,
- y = 100;
- canvas.beginPath();
- canvas.moveTo(x + size * Math.cos(0), y + size * Math.sin(0));
- for (side; side < 14+1; side++) {
- 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));
- }
- canvas.fillStyle = "#0FF333";
- canvas.fill();
- canvas.draw();
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement