BrU32

JS For Sine Wave VIS SRC

Dec 17th, 2016
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <body onmousemove="drawe();" onchange="drawe();">
  4. <canvas id="myCanvas" width="500" height="500" style="border:1px">
  5. Your browser does not support the canvas element.
  6. </canvas>
  7. <script>
  8. function drawe(){
  9. var canvas = document.getElementById("myCanvas");
  10. var ctx = canvas.getContext("2d");
  11. ctx.moveTo(event.x++,event.y=+1);
  12. ctx.lineThickness='100px';
  13. ctx.arc(Math.random()*Math.sin(event.x*1),Math.random()*Math.cos(event.y*1000),333,343,433);
  14. ctx.stroke();
  15.  
  16. }
  17. </script>
  18. </body>
  19. </html>
Advertisement
Add Comment
Please, Sign In to add comment