Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body onmousemove="drawe();" onchange="drawe();">
- <canvas id="myCanvas" width="500" height="500" style="border:1px">
- Your browser does not support the canvas element.
- </canvas>
- <script>
- function drawe(){
- var canvas = document.getElementById("myCanvas");
- var ctx = canvas.getContext("2d");
- ctx.moveTo(event.x++,event.y=+1);
- ctx.lineThickness='100px';
- ctx.arc(Math.random()*Math.sin(event.x*1),Math.random()*Math.cos(event.y*1000),333,343,433);
- ctx.stroke();
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment